RBonzo
10-21-2003, 12:42 PM
How do I make a window pop out when the user clicks a submit button? I want the window to carry a message that I write. Thanks.
|
Click to See Complete Forum and Search --> : an easy question (I think) RBonzo 10-21-2003, 12:42 PM How do I make a window pop out when the user clicks a submit button? I want the window to carry a message that I write. Thanks. fredmv 10-21-2003, 12:50 PM It can be done easily like this:<input type="button" value="Create Window" onclick="window.open('something.html','','height=400,width=300');" />However, I'd recommend against it since it destroys accessibility. You should consider reading through this (http://www.diveintoaccessibility.org/day_16_not_opening_new_windows.html). I hope that helps you out. RBonzo 10-21-2003, 01:13 PM Thanks for that response! I think I should have specified - the user will be viewing the page (written in html) within the user's e-mail window, that is: the page is embedded in the user's e-mail message. Does that change your response? Jona 10-21-2003, 01:44 PM Originally posted by RBonzo Thanks for that response! I think I should have specified - the user will be viewing the page (written in html) within the user's e-mail window, that is: the page is embedded in the user's e-mail message. Does that change your response? Since the only purpose of the button is to open a new window which utilizes JavaScript, you should use JavaScript to display the button... <script type="text/javascript"><!-- document.write("<input type=\"button\" value=\"Open window\" onclick=\"window.open('page.html','window_name','width=400,height=400');\">"); //--></script> <noscript> <a href="page.html" target="window_name">Open window</a> </noscript> [J]ona webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |