Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pop up on page load

Status
Not open for further replies.

fishin4snook

IS-IT--Management
Sep 20, 2000
83
US
How do i get a pop up banner, ad, etc... to pop up upon page load?

Thank you,
discountvacations@yahoo.com [sig][/sig]
 
you need to create a page object, then attach an onenter method, call your pop-up from inside this method and it should pop up whenever the page is entered, although this might only work on server side... [sig]<p>Matt<br><a href=mailto:matt@tubedale.co.uk>matt@tubedale.co.uk</a><br><a href= Solutions</a><br>I'm a mathematician/ computer programmer. My main interests lie in decision mathematics and web development although I am thoroughly capable in most areas of maths as well as many other forms of software development.[/sig]
 
Create a web page with the ad/banner that you wanted and call it banner.htm or anything else. Now add the following script into your page

<script language=&quot;JavaScript1.2&quot;>
<!--
function popupwin() {
newWin = window.open('banner.htm','','resizable=no,scrollbars=auto,dependent=yes,width=250,height=50');
newWin.focus();
}
-->
</script>

Add the following event handler to your body tag

onload=&quot;popupwin()&quot;

Use appropriate width and height values for your popup window to show the banner/add correctly.
[sig][/sig]
 
Thank you for your advice on this subject. [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top