tags:

views:

57

answers:

3

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

How do I create a simple JavaScript dialog / alert with a combo 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 combo box inside an alert / dialog popup window before submitting.

Thanks!

+2  A: 

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

Robusto
+2  A: 

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 combo box.

Delan Azabani
+1  A: 

See if Impromptu suits you. Check example number 17.

Example 17 has no combo box and nothing to select, just text.
Sergio Oliveira Jr.
Your link is missing a "p".
eswald
Fixed - working now.
Delan Azabani
Impromptu worked. Thanks!
Sergio Oliveira Jr.