Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Form post
April 18, 2008, 11:16 pm
rate this thread
I have code below that posts form data to a cgi scripted shopping cart
and it works great on my mac/firefox browser, but it doesn't work on
ibm/netscape machines. what gives? apparently the data isn't being
recognized and so the cart defaults to it's home page.
<form name='submit3' action='http://my.com/cart.cgi ' method='post'>
<input type='hidden' name='user' value='bighouse'>
<input type='hidden' name='item_name' value='My Product'>
<input type='hidden' name='item_number' value='001'>
<input type='hidden' name='item_price' value='3.95'>
<input type='hidden' name='item_weight' value='0'>
<input type='hidden' name='NOTAX' value=''>
<input type='hidden' name='DOWNLOAD' value='1001.zip'>
<input type='image' src='advertisement.gif' value='Buy and Download
- Jonathan N. Little
April 19, 2008, 12:43 am
Re: Form post
And the submit but is where? Which version Netscape, since currently RIP...
Also URL far better than your snippet, most likely the problem is in
something you have left out.
LITTLE WORKS STUDIO
Re: Form post
Scripsit Steven Saunderson:
It's widely supported - widely inconsistently, with different quirks and
which is very dusty but perhaps suitable in a context where someone
worries about Netscape.
That's the "classical" browser behavior. Newer implementations include
the name=value pair, too. The specifications are, as usual, fairly
There's the simple solution
<input type="submit" value="Buy">
and this should at least be used in prototypes and debugging, to
distinguish all the problems caused by image submit buttons from other
Regarding the name=value pair from a submit button (normal or image),
don't count on it. Mostly, a single form should only contain one submit
button to avoid confusion or, in some cases, two or more _equivalent_
submit buttons. The choice between different actions should be made in
some other way, e.g. radio buttons.
The idea of having different buttons for different actions in the same
form, like "Buy" and "Get info", sounds nice, but it fails to work in
general, due to implementation faults. For example, what happens when
the user types text in a text input field and hits Enter, using a
browser where that causes form submission?
Jukka K. Korpela ("Yucca")
- Beauregard T. Shagnasty
April 19, 2008, 1:32 am