Ajax replication for JavaScript prompt

JavaScript prompt command

prompt("sometext","defaultvalue");

      

is a useful way to easily get the user to provide a value. But it cannot be part of any debugged web 2.0 application (the dialog looks terrible).

Is there any existing component for displaying a modal dialog that will prompt the user with a value? I can use a pure JavaScript solution or anything that was developed for ASP.NET

0


a source to share


2 answers


I'm sure there are many things that fit the bill in most javascript frameworks. For example, there are several for jQuery, for example. Impromptu , or if you want something specifically for ASP.NET, then there are a few things you could probably use from the ASP.NET Ajax Control Toolkit , like the Modal Dialog or of course you can roll yourself!



+1


a source


You can program your own solution with a div containing an input field and a button and some javascript to show / hide the div.

This will not block the flow of javascript code, so you will need to set a callback function on the Close / Ok button.



If you're ok with JS libraries, almost all of them have a Dialog widget.

0


a source







All Articles