Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
27
rated 0 times [  34] [ 7]  / answers: 1 / hits: 21466  / 13 Years ago, mon, january 23, 2012, 12:00:00

I would like to have a javascript prompt pop up that has a selection element in it rather than a text input. When searching for a solution it seems that using jquery could definitely work but I am new to HTML and javascript and the tutorials for a jquery popup are daunting (I cannot figure out how to implement them)! Is it possible to create such a pop up with just javascript? I was hoping something like this would be possible:



prompt(<select>[options...]</select>);


Thanks in advance!


More From » javascript

 Answers
27

What you're looking for is called a modal dialog. This is really just a DIV with HTML inside it, with an overlay over the rest of the page.



You can roll-your-own or use a ready-made one from a library.


[#87848] Saturday, January 21, 2012, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kinsley

Total Points: 352
Total Questions: 84
Total Answers: 94

Location: Denmark
Member since Tue, Jul 19, 2022
2 Years ago
;