By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,215 Members | 1,005 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,215 IT Pros & Developers. It's quick & easy.

Posting form contents without having to push the button

P: n/a
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/ProcessTheD...ield1&B=Field2. . . . .

Any help gratefully accepted

Cheers

May 9 '07 #1
Share this Question
Share on Google+
17 Replies


P: n/a
At Wed, 09 May 2007 18:08:41 +0100, Johnny BeGood let his monkeys type:
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/ProcessTheD...ield1&B=Field2. . . . .

Any help gratefully accepted

Cheers
No reason to go red faced.

Using Javascript you could send the data to a script once a given field or
number of fields contain values. Why on earth you would want to use a form
in this manner is beyond me. Ask in Javascript groups how to.

If you want the form to be interactive (e.g. the form changes
following a certain choice, or a form field has code completion or
hinting) you could have a look at an AJAX solution. This (it's not
a product but a concept) combines javascript, xml and server-side
scripting to modify part of a page in your browser without having to
reload the complete page first)

AJAX is an acronym for Asynchronous Java And XML.
HTH

Sh

May 9 '07 #2

P: n/a
On May 9, 1:08 pm, "Johnny BeGood" <j...@jbg.netwrote:
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/ProcessTheD...ield1&B=Field2. . . . .

Any help gratefully accepted

Cheers
You should patent this idea before Amazon does: "Zero-Click Shopping."

May 9 '07 #3

P: n/a
Johnny BeGood wrote:
Is there a way to post the contents of a form without having to click on
the Submit button,
Yeah... Press "enter" on any text field!!

--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

Un ordenador no es un televisor ni un microondas, es una herramienta
compleja.
May 9 '07 #4

P: n/a
On May 9, 6:08 pm, "Johnny BeGood" <j...@jbg.netwrote:
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/ProcessTheD...ield1&B=Field2. . . . .

Any help gratefully accepted

Cheers
your form is set to POST so the URL above
http://www.whereever.com/ProcessTheD...ield1&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.

May 9 '07 #5

P: n/a
..oO(shimmyshack)
>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' );
JFTR: There are registered MIME types for javascript:

http://www.rfc-editor.org/rfc/rfc4329.txt
http://www.iana.org/assignments/medi...s/application/

Micha
May 9 '07 #6

P: n/a
On May 9, 7:50 pm, Michael Fesser <neti...@gmx.dewrote:
.oO(shimmyshack)
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' );

JFTR: There are registered MIME types for javascript:

http://www.rfc-editor.org/rfc/rfc432...s/application/

Micha
whoops yeah 2 typos
header( 'Content-Type: application/x-javascript' );
(although I use x-, this is only because its the default on apache
2.2.x and why change the worlds most popular server to the "correct"
mimetype, I'll wait till they change it!)
also
<script type="text/javascript" ...

May 9 '07 #7

P: n/a
Shimmy,

Thanks for your help, I want to keep things php, what I've done works just
fine, as you can probably tell I'm fairly new to php and all things similar.

"shimmyshack" <ma********@gmail.comwrote in message
news:11**********************@e65g2000hsc.googlegr oups.com...
On May 9, 7:50 pm, Michael Fesser <neti...@gmx.dewrote:
>.oO(shimmyshack)
>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' );

JFTR: There are registered MIME types for javascript:

http://www.rfc-editor.org/rfc/rfc432...s/application/

Micha

whoops yeah 2 typos
header( 'Content-Type: application/x-javascript' );
(although I use x-, this is only because its the default on apache
2.2.x and why change the worlds most popular server to the "correct"
mimetype, I'll wait till they change it!)
also
<script type="text/javascript" ...
May 10 '07 #8

P: n/a
And you should learn some manners - if you are not capable of making a valid
contribution, don't contribute, you f**king muppet!

"ZeldorBlat" <ze********@gmail.comwrote in message
news:11**********************@o5g2000hsb.googlegro ups.com...
>
You should patent this idea before Amazon does: "Zero-Click Shopping."
May 10 '07 #9

P: n/a
That works just fine!!

"Iván Sánchez Ortega" <ivansanchez-alg@rroba-escomposlinux.-.punto.-.org>
wrote in message news:f1**********@hercules.cohp1...
Johnny BeGood wrote:
>Is there a way to post the contents of a form without having to click on
the Submit button,

Yeah... Press "enter" on any text field!!

--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

Un ordenador no es un televisor ni un microondas, es una herramienta
compleja.
May 10 '07 #10

P: n/a
Johnny BeGood wrote:
And you should learn some manners - if you are not capable of making a
valid contribution, don't contribute, you f**king muppet!

"ZeldorBlat" <ze********@gmail.comwrote in message
news:11**********************@o5g2000hsb.googlegro ups.com...
>>
You should patent this idea before Amazon does: "Zero-Click Shopping."
Yep, you need to learn some manners - and get a sense of humor, asshole.

His contribution was valid - with a subtle amount of humor. Go back to
alt.grouches, where you belong.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
May 10 '07 #11

P: n/a
On May 10, 1:57 am, "Johnny BeGood" <j...@jbg.netwrote:
And you should learn some manners - if you are not capable of making a valid
contribution, don't contribute, you f**king muppet!

"ZeldorBlat" <zeldorb...@gmail.comwrote in message

news:11**********************@o5g2000hsb.googlegro ups.com...
You should patent this idea before Amazon does: "Zero-Click Shopping."
Yes -- you, too, should get some manners and stop top-posting.

May 10 '07 #12

P: n/a
shimmyshack wrote:
should return the correct content-type for javascript.
header( 'Content-Type: text/x-javascript' );
Just wondering, where did you get that MIME from?

I thought it was supposed to be:

application/x-javascript

At least "application/javascript" is not obsolete yet.

Then again, I cannot read an RFC to save my life.

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
May 12 '07 #13

P: n/a
-Lost wrote:
shimmyshack wrote:
>should return the correct content-type for javascript.
header( 'Content-Type: text/x-javascript' );

Just wondering, where did you get that MIME from?

I thought it was supposed to be:

application/x-javascript

At least "application/javascript" is not obsolete yet.

Then again, I cannot read an RFC to save my life.
Bah, disregard shimmyshack. I didn't even see any posts beyond yours
until I posted the above.

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
May 12 '07 #14

P: n/a
On May 12, 12:42 pm, -Lost <maventheextrawo...@techie.comwrote:
-Lost wrote:
shimmyshack wrote:
should return the correct content-type for javascript.
header( 'Content-Type: text/x-javascript' );
Just wondering, where did you get that MIME from?
I thought it was supposed to be:
application/x-javascript
At least "application/javascript" is not obsolete yet.
Then again, I cannot read an RFC to save my life.

Bah, disregard shimmyshack. I didn't even see any posts beyond yours
until I posted the above.

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
dont worry, its my fault for being so slap dash with the keyboard.
I actually just copy the apache default, it seems to be very
prevelant, although google get it right as per RFC, so perhaps I could
start to change my coding habits, or at least my mimes.type file!!

May 12 '07 #15

P: n/a
shimmyshack wrote:
On May 12, 12:42 pm, -Lost <maventheextrawo...@techie.comwrote:
>-Lost wrote:
>>shimmyshack wrote:
should return the correct content-type for javascript.
header( 'Content-Type: text/x-javascript' );
Just wondering, where did you get that MIME from?
I thought it was supposed to be:
application/x-javascript
At least "application/javascript" is not obsolete yet.
Then again, I cannot read an RFC to save my life.
Bah, disregard shimmyshack. I didn't even see any posts beyond yours
until I posted the above.

dont worry, its my fault for being so slap dash with the keyboard.
I actually just copy the apache default, it seems to be very
prevelant, although google get it right as per RFC, so perhaps I could
start to change my coding habits, or at least my mimes.type file!!
Do you keep a MIME list or do you poll an RFC server?

I prefer to keep my own MIME, as required/normally used MIME types don't
change too much in my applications.

The mime.types files I have from Apache 1.3 and 2.x are identical. How
old of an install are you using if it has an obsolete JavaScript MIME type?

Mine is from 2004/07/15 12:34pm (1089909240).

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
May 12 '07 #16

P: n/a
On May 12, 3:03 pm, -Lost <maventheextrawo...@techie.comwrote:
shimmyshack wrote:
On May 12, 12:42 pm, -Lost <maventheextrawo...@techie.comwrote:
-Lost wrote:
shimmyshack wrote:
should return the correct content-type for javascript.
header( 'Content-Type: text/x-javascript' );
Just wondering, where did you get that MIME from?
I thought it was supposed to be:
application/x-javascript
At least "application/javascript" is not obsolete yet.
Then again, I cannot read an RFC to save my life.
Bah, disregard shimmyshack. I didn't even see any posts beyond yours
until I posted the above.
dont worry, its my fault for being so slap dash with the keyboard.
I actually just copy the apache default, it seems to be very
prevelant, although google get it right as per RFC, so perhaps I could
start to change my coding habits, or at least my mimes.type file!!

Do you keep a MIME list or do you poll an RFC server?

I prefer to keep my own MIME, as required/normally used MIME types don't
change too much in my applications.

The mime.types files I have from Apache 1.3 and 2.x are identical. How
old of an install are you using if it has an obsolete JavaScript MIME type?

Mine is from 2004/07/15 12:34pm (1089909240).

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
I keep my own where it isn't in the apache mime.types file,
even the latest version of apache 2.2.4 gives
application/x-javascript js
which is a bit of a cheek because earlier in the file it has a
reference to
http://www.iana.org/assignments/media-types/
which gives it as
application/javascript
(and has a bit of a whinge: "Various unregistered media types have
been used in an ad-hoc fashion")
so for years I have kept the apache default, trying every now and then
to update, perhaps it is time as Michael says.

May 12 '07 #17

P: n/a
shimmyshack wrote:
On May 12, 3:03 pm, -Lost <maventheextrawo...@techie.comwrote:
>shimmyshack wrote:
>>On May 12, 12:42 pm, -Lost <maventheextrawo...@techie.comwrote:
-Lost wrote:
shimmyshack wrote:
>should return the correct content-type for javascript.
>header( 'Content-Type: text/x-javascript' );
Just wondering, where did you get that MIME from?
I thought it was supposed to be:
application/x-javascript
At least "application/javascript" is not obsolete yet.
Then again, I cannot read an RFC to save my life.
Bah, disregard shimmyshack. I didn't even see any posts beyond yours
until I posted the above.
dont worry, its my fault for being so slap dash with the keyboard.
I actually just copy the apache default, it seems to be very
prevelant, although google get it right as per RFC, so perhaps I could
start to change my coding habits, or at least my mimes.type file!!
Do you keep a MIME list or do you poll an RFC server?

I prefer to keep my own MIME, as required/normally used MIME types don't
change too much in my applications.

The mime.types files I have from Apache 1.3 and 2.x are identical. How
old of an install are you using if it has an obsolete JavaScript MIME type?

Mine is from 2004/07/15 12:34pm (1089909240).

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.

I keep my own where it isn't in the apache mime.types file,
even the latest version of apache 2.2.4 gives
application/x-javascript js
which is a bit of a cheek because earlier in the file it has a
reference to
http://www.iana.org/assignments/media-types/
which gives it as
application/javascript
(and has a bit of a whinge: "Various unregistered media types have
been used in an ad-hoc fashion")
so for years I have kept the apache default, trying every now and then
to update, perhaps it is time as Michael says.
Yeah, I just noticed that as well in the mime.types and the RFC.

Definitely time to pay attention to the updated MIME types and not the
old! ;)

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
May 12 '07 #18

This discussion thread is closed

Replies have been disabled for this discussion.