I am opening a window as a modal. window.showModalDialog(‘http://www.google.com‘,”,’dialogWidth:500px;dialogHeight:500px’)
as I set height, what are other options available? Like option buttons, menus etc. where I can find tutorials?
EDIT
It works in Mozilla firefox, but people are saying it doesn’t!
My code is
Please somebody Edit my sample code for display purpose
<html> <head> <script> function abc() { window.showModalDialog('3.htm', '', 'dialogWidth:500px;dialogHeight:500px'); } </script> </head> <body> <input type='button' id='check' name='check' onclick='abc()' value='open'/> </body> </html>
Second EDIT
code for page 3.htm
<html> <head> <script> function abc(){ close() } </script> </head> <body> <input type='button' id='check' name='check' onclick='abc()' value='close'/> </body> </html>
Check out both code on fire fox! and tell me.
Third EDIT
Ok It’s not working in corme and opera
Be aware that showModalDialog is IE specific and won’t necessarily work with other browsers. If you want cross browser modal dialogs you need to use a div to hide the rest of the page and overlay your dialog on top. It is easier to use an existing javascript library that already takes care of this.