Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Automatic form submission

Reply
Thread Tools

Automatic form submission

 
 
BernieH
Guest
Posts: n/a
 
      10-07-2004
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



 
Reply With Quote
 
 
 
 
Jan Faerber
Guest
Posts: n/a
 
      10-07-2004
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
 
Reply With Quote
 
 
 
 
BernieH
Guest
Posts: n/a
 
      10-07-2004
Jan, thank you! I didn't pick up on that.

BernieH

"Jan Faerber" <(E-Mail Removed)> wrote in message
news699d.354429$(E-Mail Removed)...
> 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



 
Reply With Quote
 
Jan Faerber
Guest
Posts: n/a
 
      10-07-2004
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...ww.teamone.de/

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

--
Jan

http://213.47.90.11
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
automatic submission of forms grpmangr@yahoo.com HTML 2 03-27-2006 10:09 AM
Form Submission Automatic To Another URL degmsb@hotmail.com Perl Misc 2 02-26-2006 05:59 AM
automatic email notification of online form submission =?Utf-8?B?aGF2ZW5vY2x1ZQ==?= ASP .Net 6 10-24-2005 07:06 PM
automatic form submission Piotr Kurpiel Javascript 1 03-18-2005 05:30 PM
simple perl script for automatic form submission. sam Perl Misc 6 11-13-2004 01:38 PM



Advertisments