最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

A JavaScript alert or dialog with a combo box - Stack Overflow

programmeradmin2浏览0评论

This looks fairly simple, but 30 minutes of googling took me nowhere. :-(

How do I create a simple JavaScript dialog / alert with a bo box so my user can select a value before submitting? I am using this for a rejection reason so user clicks on reject button and must select a reason from a bo box inside an alert / dialog popup window before submitting.

Thanks!

This looks fairly simple, but 30 minutes of googling took me nowhere. :-(

How do I create a simple JavaScript dialog / alert with a bo box so my user can select a value before submitting? I am using this for a rejection reason so user clicks on reject button and must select a reason from a bo box inside an alert / dialog popup window before submitting.

Thanks!

Share Improve this question asked Jul 13, 2010 at 1:18 TraderJoeChicagoTraderJoeChicago 6,3258 gold badges52 silver badges55 bronze badges 1
  • Isn't something already made for that? JQuery? Prototype? It looks like something basic to be re-used over and over again... – TraderJoeChicago Commented Jul 13, 2010 at 1:45
Add a ment  | 

3 Answers 3

Reset to default 3

The inbuilt JavaScript dialog functions alert, prompt and confirm can't do this. Rather than use a "real" popup instead, which creates a button in the taskbar, try creating a window-like <div> element as an in-page popup, with the bo box.

See if Impromptu suits you. Check example number 17.

You can't do that with alert(), prompt(), or confirm() methods. You would have to create a popup or popin to host the bo box (select).

发布评论

评论列表(0)

  1. 暂无评论