Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

popup form using html/javascript/css

I have to open an html form in a popup. Popup should not be a window (that is usually created using window.open() ), instead it should be like one appeared in the link below (open in firefox) http://www.w3schools.com/js/tryit.asp?filename=tryjs_prompt But the problem with this code is that, I cannot change the content popup content from "Please enter your name" to my html form. While searching, I found that there we CANNOT change the content of popup Prompt Box and the only solution is to create your own popup... Isn't there any easier solution ?

Thank you....

like image 853
Neetu Pant Avatar asked Jun 07 '11 13:06

Neetu Pant


People also ask

How do you show a pop up in JavaScript?

The syntax to open a popup is: window. open(url, name, params) : url. An URL to load into the new window.

Can we add pop ups using JavaScript?

You can use JavaScript to create popup windows. Popup windows are different to simply opening a new browser window. If you only want to open a new browser window you can add the target="_blank" attribute within the <a> element (see this article on opening a new window in HTML).


1 Answers

Please try jQuery UI dialog

Here is the forms demo

For mobile use, have a look at jQuery Mobile - Creating dialogs

like image 195
mplungjan Avatar answered Sep 28 '22 11:09

mplungjan