Is it possible to provide multiple input fields in a quick alert window in javascript?

I have a situation where I have to provide several input fields in the help window in JavaScript or jQuery, is there any way to do this.

Any help would be appreciated.

+7
source share
2 answers

Take a look at jQuery UI Dialog , a particularly modal form example .

Your html might look like this:

<div id="dialog"> <input type="text" id="input1" /> <input type="text" id="input2" /> </div> 

and script:

 $(document).ready(function() { $("#dialog").dialog({ close: function(event, ui) { // do whatever you need on close } }); }); 
+12
source

you cannot customize the browser prompt window, however you can use the jquery ui dialog box

 $( "#dialog" ).dialog(); 
+3
source

All Articles