Results 1 to 3 of 3

Thread: DHTML Window widget - how to delay popup

  1. #1
    Join Date
    Jun 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Wink DHTML Window widget - how to delay popup

    1) Script Title: DHTML Window widget

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ndow/index.htm

    3) Describe problem:

    I am working on this script set up on my page in progress:
    http://www.campuscalm.com/dhtml.html

    I am looking to have the window load after about 15 seconds or so instead of loading immediately on pageload. The .JS file is really complex and I don't dare mess with something way beyond my level, so I am hoping someone can tell me what code could be included to create a delay. I think I need to use a command something like this: window.setTimeout("firePopup()", 15000); but I don't have any idea how to do it.

    Any help would be greatly appreciated!

    Thanks,
    Shaun
    http://www.dynamicdrive.com/forums/i...s/confused.gif
    Last edited by shaunmacie; 06-05-2007 at 03:15 PM. Reason: didn't finish

  2. #2
    Join Date
    Jun 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I did some more research and I think I'm on the right track, but it needs fine tuning because it still doesn't work. I added the function script for my window to delay 5 seconds, but either it not formatted correctly or it won't work this way, because it doesn't work as-is:

    Code:
    <link rel="stylesheet" href="dhtmlwindow/windowfiles/dhtmlwindow.css" type="text/css" />
    
    <script type="text/javascript">
    function Delay()
    {
      setTimeout('popupwin', 5000);
    }
    
    </script>
    
    <script type="text/javascript" src="dhtmlwindow/windowfiles/dhtmlwindow.js">
    
    /***********************************************
    * DHTML Window Widget- © Dynamic Drive (www.dynamicdrive.com)
    * This notice must stay intact for legal use.
    * Visit http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    </script>
    
    </head>
    
    <body onload="Delay()" bgcolor="#7FC31C" topmargin="25">
    
    <script type="text/javascript">
    var popupwin=dhtmlwindow.open("signup", "ajax", "students.html", "Campus Calm Signup", "width=200px,height=350px,resize=0,scrolling=0,left=50px,top=50px", "recal");
    
    </script>

  3. #3
    Join Date
    Jun 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have a modified code that works in Safari, but doesn't work in IE or Firefox. Here it is:

    Code:
    <link rel="stylesheet" href="dhtmlwindow/windowfiles/dhtmlwindow.css" type="text/css" />
    
    <script type="text/javascript">
    function Delay()
    {
      setTimeout('popupwin()',5000);
    }
    
    </script>
    
    <script type="text/javascript" src="dhtmlwindow/windowfiles/dhtmlwindow.js">
    
    
    
    /***********************************************
    * DHTML Window Widget- © Dynamic Drive (www.dynamicdrive.com)
    * This notice must stay intact for legal use.
    * Visit http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    </script>
    
    </head>
    
    <body onload="Delay()" bgcolor="#7FC31C" topmargin="25" onLoad="MM_preloadImages('campuscalmimages/calm_beginnings_on.gif','campuscalmimages/free_tips_on.gif','campuscalmimages/free_articles_on.gif','campuscalmimages/did_you_know_on.gif','campuscalmimages/calm_for_students_on.gif','campuscalmimages/educators_on.gif','campuscalmimages/products_on.gif','campuscalmimages/media_kit_on.gif','campuscalmimages/calm_perspectives_on.gif','campuscalmimages/sound_off_on.gif','campuscalmimages/blog_on.gif','campuscalmimages/contact_on.gif','campuscalmimages/parents_forum_on.gif')">
    
    <script type="text/javascript">
    var popupwin = function(){  dhtmlwindow.open("signup", "ajax", "students.html", "Campus Calm Signup", "width=200px,height=350px,resize=0,scrolling=0,left=50px,top=50px", "recal"); }
    
    </script>
    Here is the page that works in Safari:
    http://www.campuscalm.com/dhtml2.html

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
  •