Automatic form submission

Discussion in 'HTML' started by BernieH, Oct 7, 2004.

  1. BernieH

    BernieH Guest

    I'm trying to move a search value from one page to another; this works
    nicely. Except that the user has to click a button to submit the 2nd page.
    Can anybody suggest something to ensure the 2nd page is submitted
    automatically without having to click "submit".

    Here's the code.

    TIA


    <HTML>
    <HEAD>
    <TITLE>Welcome to XYZ</TITLE>
    </HEAD>
    <BODY onload="document.xyz.submit()">
    <form name="form1" method="get"
    action="http://www.some.com./search-name.asp?">
    <input type="hidden"
    name="tfSearchName" value="<?php $search=$HTTP_GET_VARS['search']; echo
    "$search"; ?>">
    <!-- <input type="submit" name="btSearchCo23" value="submit"> -->
    Your browser should continue
    automatically to XYZ. If it doesn't, click <input type="submit" value="
    here ">
    </form>
    </BODY>
    </HTML>

    BernieH
     
    BernieH, Oct 7, 2004
    #1
    1. Advertising

  2. BernieH

    Jan Faerber Guest

    BernieH wrote:

    > Can anybody suggest something to ensure the 2nd page is submitted
    > automatically without having to click "submit".


    ....
    > </HEAD>
    > <BODY onload="document.xyz.submit()">
    > <form name="form1" method="get"
    > action="http://www.some.com./search-name.asp?">

    ....


    It redirects fine for me with the correct element names:
    <BODY onload="document.form1.submit()">

    --
    Jan

    http://213.47.90.11
     
    Jan Faerber, Oct 7, 2004
    #2
    1. Advertising

  3. BernieH

    BernieH Guest

    Jan, thank you! I didn't pick up on that.

    BernieH

    "Jan Faerber" <> wrote in message
    news:x699d.354429$...
    > BernieH wrote:
    >
    >> Can anybody suggest something to ensure the 2nd page is submitted
    >> automatically without having to click "submit".

    >
    > ...
    >> </HEAD>
    >> <BODY onload="document.xyz.submit()">
    >> <form name="form1" method="get"
    >> action="http://www.some.com./search-name.asp?">

    > ...
    >
    >
    > It redirects fine for me with the correct element names:
    > <BODY onload="document.form1.submit()">
    >
    > --
    > Jan
    >
    > http://213.47.90.11
     
    BernieH, Oct 7, 2004
    #3
  4. BernieH

    Jan Faerber Guest

    BernieH wrote:

    > Jan, thank you! I didn't pick up on that.
    >
    > BernieH
    >



    >> It redirects fine for me with the correct element names:
    >> <BODY onload="document.form1.submit()">



    Or maybe you want to use a perl script like this?

    #!/usr/bin/perl -w

    use strict;
    use CGI;
    my $cgi = new CGI;
    use CGI::Carp qw(fatalsToBrowser);

    open(FH,">>/usr/web/data/userlog.xml");
    print FH "<user-call>\n <remote-host>",
    $cgi->remote_host(),
    "</remote-host>\n <user-agent>",
    $cgi->user_agent(),
    "</user-agent>\n <goto-url>",
    $cgi->url_param('goto'),
    "</goto-url>\n <time-stamp>",
    localtime(time),
    "</time-stamp>\n</user-call>\n";
    close(FH);

    print $cgi->redirect($cgi->url_param('goto'));


    Then you can use in a href=".. something like this
    http://localhost/cgi-bin/redirect.pl?goto=http://www.teamone.de/

    Yes, I found that on teamone.de - it´s german - I know - I am a looser.

    --
    Jan

    http://213.47.90.11
     
    Jan Faerber, Oct 7, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?aGF2ZW5vY2x1ZQ==?=

    automatic email notification of online form submission

    =?Utf-8?B?aGF2ZW5vY2x1ZQ==?=, Oct 24, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    586
    =?Utf-8?B?aGF2ZW5vY2x1ZQ==?=
    Oct 24, 2005
  2. Replies:
    2
    Views:
    585
  3. sam
    Replies:
    6
    Views:
    207
  4. Replies:
    2
    Views:
    135
    Rick Scott
    Feb 26, 2006
  5. Piotr Kurpiel

    automatic form submission

    Piotr Kurpiel, Mar 18, 2005, in forum: Javascript
    Replies:
    1
    Views:
    148
    Erwin Moller
    Mar 18, 2005
Loading...

Share This Page