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 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2002
    Location
    Ontario Canada
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to... Popup on load + timed close of popup?

    Hi All,


    I have a registration form that, on submit redirects to a specific page with information. I would like to have a popup appear when this page loads to thank the user, however i would like this popup to automatically close in say 6 seconds or so. Can this be done?

    Any info would be greatly appreciated

    On a sidenote, how would i go about applying 2 functions on the same attribute of the BODY tag? (I.E. I would like to have "Preload Images" and another function fire on "onLoad" of the body tag. What type of syntax will allow this?

    I have tried
    onLoad="newWindow()" "MM_preloadImages()" but that doesn't work. I have also tried
    onLoad="newWindow()" onLoad"MM_preloadImages()" but that doesn't work either?


    Thanks Again,
    G5

  • #2
    Regular Coder ellisd5's Avatar
    Join Date
    Jun 2002
    Location
    Uk
    Posts
    160
    Thanks
    5
    Thanked 0 Times in 0 Posts
    First Question
    in the popup window have the following line to close it within six seconds.
    Code:
        <body onload="setTimeout('window.close()', 1000*6)">
    Second Question
    You need to seperate them with commas or create a new function to call them

    Code:
        onLoad="newWindow(); MM_preloadImages();"
    or
    Code:
        function onLoadFunc() {
            newWindow();
            MM_preloadImages();
        }
        ...
        ...
        ...
        onLoad="onLoadFunc"


  •  

    Posting Permissions

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