SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot litmania_com's Avatar
    Join Date
    Feb 2001
    Location
    London
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have a pop-up on my site which only appears once a week with cookies.

    The body tag is:

    <BODY OnLoad="checkCount()">

    How can I ammend it so that the pop-up only appears a certain number of seconds after a surfer comes to my page?

    I have the following code, but don't know how to seam it with the above one:

    <body onLoad="setTimeout('window.focus()',600000)">

    The page I'm referring to is:
    http://www.crosswinds.net/~rfrost/links.html

    Thanks for your help
    Nadeem Azam
    Litmania.com Inc.

    Free promotion - check out this 1:1 banner exchange
    Dot com domains - the world's most prestigious domain names for sale

  2. #2
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <body onLoad="setTimeout('checkCount()',5000)"> will run checkCount() after 5 seconds.

  3. #3
    SitePoint Zealot litmania_com's Avatar
    Join Date
    Feb 2001
    Location
    London
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you - that's great.

    Just one other question (sorry, I'm not expert on Javascript). How do I add the following call command to the above code you've given me?:

    onload="exit()"

    Without it, it doesn't call the pop-up.

    Thank you very much.
    Nadeem Azam
    Litmania.com Inc.

    Free promotion - check out this 1:1 banner exchange
    Dot com domains - the world's most prestigious domain names for sale

  4. #4
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One of the best ways to figure it out is to start typing what you want into the code and then test after each step. You'll get it right after a while.

    <body onLoad="setTimeout('window.focus()',600000);exit()">

    That should work.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes


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
  •