|
Posted by shimmyshack on 05/09/07 18:20
On May 9, 6:08 pm, "Johnny BeGood" <j...@jbg.net> wrote:
> Hi All,
>
> Is there a way to post the contents of a form without having to click on the
> Submit button, i.e
>
> <form method="post" action="http://www.whereever.com/ProcessTheData.php">
> <INPUT name="Field1" type="text">
> <INPUT name="Field2" type="text">
> <INPUT name="Field3" type="text">
> <INPUT name="EsendexRecipient" type="text">
> <TEXTAREA name="Block" rows="3" cols="20"></TEXTAREA>
> <input type="submit" value="Submit">
> </form>
>
> Can it be done as follows, are am I going to end up red faced again?
>
> http://www.whereever.com/ProcessTheData.php?A=Field1&B=Field2. . . . .
>
> Any help gratefully accepted
>
> Cheers
your form is set to POST so the URL above
http://www.whereever.com/ProcessTheData.php?A=Field1&B=Field2. . . . .
wont happen,
also this script has a habit of revealing email addresses as they hard
coded in the form, as was the password as well in some old cases.
javascript is a way to POST the form,
<body onload="document.getElementById('form_id').submit()" >
or use the more traditional method of referencing the form by its
name.
if you wanted to just submit info you could indeed use get.
<script type="text.javascript" src="http://www.whereever.com/
ProcessTheData.php?A=Field1&B=Field2"></script>
that would do, stick it in the head and the data is sent to the
script.
ProcessTheData.php
should return the correct content-type for javascript.
header( 'Content-Type: text/x-javascript' );
If you users have javascript off, you will need to use an image, if
they have images off, use an invisible iframe.
We arent talking professional solutions here right. We are talking a
bounce page of some sort which is for your own use.
Navigation:
[Reply to this message]
|