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
    May 2004
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    submiting a form

    Hi,

    I want to execute the following code that opens a window with specified URL and close it after certain time. Problem is I not only want to go to the sperciied URL but want to submit a form along with that too, Is it possible to do that?



    <SCRIPT LANGUAGE="JavaScript">

    <!-- Begin
    closetime = 10; // Close window after __ number of seconds?
    // 0 = do not close, anything else = number of seconds

    function Start(URL, WIDTH, HEIGHT) {
    windowprops = "left=50,top=50,width=" + WIDTH + ",height=" + HEIGHT;
    preview = window.open(URL, "preview", windowprops);
    if (closetime) setTimeout("preview.close();", closetime*1000);
    }



    function doPopup() {
    url = "http://paypal.com";
    width = 370; // width of window in pixels
    height = 308; // height of window in pixels
    delay = 10; // time in seconds before popup opens
    timer = setTimeout("Start(url, width, height)", delay*1000);
    }
    // End -->
    </script>

  • #2
    Smokes a Lot
    Join Date
    Jul 2003
    Location
    CA, USA
    Posts
    1,594
    Thanks
    5
    Thanked 20 Times in 20 Posts
    Just like this?

    Code:
    <SCRIPT LANGUAGE="JavaScript">
    
    <!-- Begin
    closetime = 10; // Close window after __ number of seconds?
    // 0 = do not close, anything else = number of seconds
    
    function Start(URL, WIDTH, HEIGHT) {
    windowprops = "left=50,top=50,width=" + WIDTH + ",height=" + HEIGHT;
    preview = window.open(URL, "preview", windowprops);
    if (closetime) setTimeout("preview.close();", closetime*1000);
    }
    
    
    
    function doPopup() {
    url = "http://paypal.com";
    width = 370; // width of window in pixels
    height = 308; // height of window in pixels
    delay = 10; // time in seconds before popup opens
    timer = setTimeout("Start(url, width, height)", delay*1000);
    document.myformname.submit();
    }
    // End -->
    </script>
    Basscyst
    Helping to build a bigger box. - Adam Matthews


  •  

    Posting Permissions

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