SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Mad Beach Bum jgsketch's Avatar
    Join Date
    Aug 2002
    Location
    FL
    Posts
    825
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    onload outside of BODY tag?

    Hello, Had a quick question. I'm trying to get a popup working on my site. I use headers and was wondering if there is a way to put the onload outside of the BODY tag? My header has the BODY tag in it. I only want the popup to come up on one page and not all the pages that use my header. Any help would be great, Thanks.

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The most common way is

    <head>
    <script type="text/javascript">
    onload = function()
    {
    // your code here
    }
    </script>
    </head>
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  3. #3
    Mad Beach Bum jgsketch's Avatar
    Join Date
    Aug 2002
    Location
    FL
    Posts
    825
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks so much. But my HEAD tag is in my header, wouldn't this cause the popup to show on all the pages? Can I put after the <body> tag? Thanks.

    ***Found a script that lets me do it. Thanks.***
    Last edited by jgsketch; Dec 31, 2003 at 10:04.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •