Javascript Displays PopUp Window (JDPW)


JDPW:   SOLD       




Popup windows are widely used to display advertising information services. Usually popup windows appear by clicking on a banner or image installed on the main web page. Here is the source program:

<html>
<<head>
<title> </title>
<script>

function popUp(URL) { day = new Date(); id = day.getTime();
eval("page"  +  id  +  "  =  window.open(URL,  '"  +  id  +  "',
'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=250,height=250,left = 304,top = 150.5');");
}

</script>
</head>

<body>
<a href="javascript:popUp('popup.html')">popup</a>
</body>
</html>

Pay attention to the tag: <a href ="javascript:popUp('popup.html')">popup</a>. When the mouse clicks on the word: popup, javascript will call the popUp() function by bringing the popup.html link. The popup window will appear by displaying the popup.html page. Therefore we prepare the popup.html file. Here is the source program:

<html>
<head>
<title>popup</title>
</head>
<body>
Halaman PopUp
</body> </html>

We can set the properties of the popup window that will appear by setting the properties in the popup() function. The standard popup window that is often used is to set all properties to 0 (disable), except for the width size for the popup width & height for the popup height. We can set all these settings according to our needs. Note: works well on IE & Mozilla browsers.


Post a Comment

Previous Next

نموذج الاتصال