HOME
          About US
          Contact Us

Automatic Popup Window

Chapter - 11 : Using Additional Frames / Windows (Automatic Popup Window): (Page 6/6)


(Cotinued from previous page)

11.3.2 - Automatic popup: The method defined in 11.3.1 will activate popup on clicking text / image. By this method popup will activate automatically. It may be noted that this command in written within the 'head' section i.e. before the </head> tag.

Command: <script language="javascript"> timer=setTimeout("window.open('temp.html','','toolbar=0,location=0, directories=0,status=0, menubar=1,scrollbars=1,resizable=0,width=150,height=150')",1000) </script>

Here the last value 1000 is the time delay for popup. This popup will get automatically displayed after 1000 mille second of original page load. The delay can be changed to any value. As explained earlier, in this case also you may change the other value as per your requirement.


11.3.3 - Closing Popup: Any web page can be closed by clicking on the 'x' mark (appearing at the Top-Right corner). But to give it a professional look you can add closing button. The following command is to be added in the page, which will open as popup. The command is to be written between <body> and </body> tag.

<form> <input type="button" value="Close" onClick='self.close()' style="background-color: Automatic Popup Window0080000; border: solid Automatic Popup Windowff000000 1px;"> </form>

Automatic in HTML The 'close' button' will appear in popup window some thing as per FIG - 11.5
Automatic Popup Window
© funandhobby.com (Automatic Popup Window)