| Popup windows with a little help from JavaScript |
Wouldn't it be nice to pop-up a little window from your web pages to display messages once in a while (rather than jumping to another page)?
<FORM METHOD="post">
<INPUT TYPE="button" VALUE="Click me!"
OnClick = "hint_wnd = window.open( '', 'hint_wnd', 'width=50, height=60, resizable=no, scrollbars=no' );
hint_wnd.document.write( 'Hello there!' ); return true;">
</FORM>
As you can see, we simply use the "OnClick" event open a window named "hint_wnd," and finally write the string "Hello, there!" to the "hint_wnd" window. |
| Return to Listing |