Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jun 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Setting delay on popup window

    I have a rollover graphic (gif image) on my site that, obviously, when rolled over will bring up a site related popup.
    The problem is that the graphic is well placed to make the site look good, but it is so close to everything else that it gets annoying because it always get rolled over and I get the popup.

    with the following script, I need to find a way of delaying the opening of the popup, (it already has a close delay as you can see). This may cause a little bit of trouble when it rolled over and the delay is such that customers think the it doesnt work. So, I need to also make it clickable to open the same popup.

    (I KNOW WHAT I'M THINKING. JUST CANT PUT IT INTO WORDS).
    The Script:

    head:

    <script Language="JavaScript">
    <!-- //
    word=new Array();
    word[0]="<center>xxxxxxxxxxxxxxxtextxxxxxxxxxxxxxxxxxxx
    <b>xxxxxxxtextxxxxxxxx</b>

    xxxxxxxxtextxxxxxxx</b></br>
    xxxxxtextxxxxxxx</br>
    <b>xxxxxtextxxxx";

    function popdef(n){
    info=window.open("","info","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no ,resizable=yes,copyhistory=no,width=750,height=260")

    info.document.open()
    info.document.write("<html><head><title> Site Information</title></head><body color: #678096>")
    info.document.write(word[n])
    info.document.write("</body></html>")
    info.document.close()
    clearID=info.setTimeout("self.close()",4000)
    return true;
    }
    // -->
    // -->
    </script>

    Body:

    <a href="javascript:opener.location='title.htm';window.close()"><img border="0" src="images/index/view_in_browser.gif" width="107" align="right" alt=""></a>

    Again, thanks

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    Since you've (correctly) identified a potential source of annoyance for your users, why not just eliminate it altogether?

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What Adios said. If you must still have the popup, why not use some other less prominent element to trigger it. If the popup just appears a few seconds after someone has moused over the logo they might not understand why it pops up.
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #4
    New to the CF scene
    Join Date
    Jun 2004
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    But if for some reason you DO want the delay . . .
    I think what you want is just to add this to the link tag:

    onmouseover="setTimeout('popdef()',2000)"


  •  

    Posting Permissions

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