473,226 Members | 1,321 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,226 software developers and data experts.

Form post

Hello and thanks in advance for your help.
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
Now' name='add_to_cart'>
</form>
Jun 27 '08 #1
5 1794
zoomcart.com wrote:
Hello and thanks in advance for your help.
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
Now' name='add_to_cart'>
</form>
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.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Jun 27 '08 #2
On Fri, 18 Apr 2008 20:43:26 -0400, "Jonathan N. Little"
<lw*****@central.netwrote:
zoomcart.com wrote:
<form name='submit3' action='http://my.com/cart.cgi' method='post'>
<input type='image' src='advertisement.gif' value='Buy and Download
Now' name='add_to_cart'>
</form>

And the submit but is where? Which version Netscape, since currently RIP...
I thought 'image' functioned as a submit button. Perhaps it isn't
widely supported.
--
Steven
Jun 27 '08 #3
zoomcart.com wrote:
I have code below that posts form data to a cgi scripted shopping cart
....
<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'>
Is that safe?
What will happen if I make a copy of your form and change to:

<input type='hidden' name='item_price' value='0.03'>

Will your cart sell 'My Product' to me for 3 ?

--
-bts
-you can still add the shipping
Jun 27 '08 #4
On Sat, 19 Apr 2008 11:27:25 +1000, Steven Saunderson <ph****@Syd.au>
wrote:
On Fri, 18 Apr 2008 20:43:26 -0400, "Jonathan N. Little"
<lw*****@central.netwrote:
zoomcart.com wrote:
<form name='submit3' action='http://my.com/cart.cgi' method='post'>
<input type='image' src='advertisement.gif' value='Buy and Download
Now' name='add_to_cart'>
</form>
And the submit but is where? Which version Netscape, since currently RIP...

I thought 'image' functioned as a submit button. Perhaps it isn't
widely supported.
I've just tested using Opera and for the 'image' above it would include
'&add_to_cart.x=0&add_to_cart.y=0' in the GET array (presumably the same
for POST). But there is no '&add_to_cart=whatever' and this makes it
different from a submit button.
--
Steven
Jun 27 '08 #5
Scripsit Steven Saunderson:
>>><form name='submit3' action='http://my.com/cart.cgi' method='post'>
<input type='image' src='advertisement.gif' value='Buy and Download
Now' name='add_to_cart'>
</form>
...
>I thought 'image' functioned as a submit button. Perhaps it isn't
widely supported.
It's widely supported - widely inconsistently, with different quirks and
oddities. See
http://www.cs.tut.fi/~jkorpela/forms/imagebutton.html
which is very dusty but perhaps suitable in a context where someone
worries about Netscape.
I've just tested using Opera and for the 'image' above it would
include '&add_to_cart.x=0&add_to_cart.y=0' in the GET array
(presumably the same for POST). But there is no
'&add_to_cart=whatever' and this makes it different from a submit
button.
That's the "classical" browser behavior. Newer implementations include
the name=value pair, too. The specifications are, as usual, fairly
obscure.

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
problems.

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")
http://www.cs.tut.fi/~jkorpela/

Jun 27 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: TG | last post by:
Dear PHP Group, I have two forms that are used to collect user information. The first one takes user inputted values such as fullname, city, address etc. I want these values to display in the...
3
by: sammmista | last post by:
hello experts, Plz dont treat this as another newbie query , i did my homework but still getting nowhere :( :( :( Trying to learn PHP on Fedora core 1 (PHP 4.3,MySQL,HTTPD).Unable to post data...
3
by: Harvey | last post by:
Hi, I try to write an asp query form that lets client search any text-string and display all pages in my web server that contain the text. I have IIS 6.0 on a server 2003. The MSDN site says...
5
by: Paxton | last post by:
I created an html email containing a form whose method is POST. The form is posted to an asp page for processing, but no values are retrieved. So I response.write all the Request.Form fields, and...
10
by: Noozer | last post by:
Below is some ASP, HTML and javascript. It is part of a page used to maintain a small database. This code did work at one time, but has since stopped. For some reason the data on my form is not...
9
by: eswanson | last post by:
I have a web page I need to post a file plus some other fields to it. How can I do this from a asp.net page. I know I can send individual fields to the other page, but how do I send a file to the...
8
by: Gert | last post by:
Hi, I have a form (server side) because of the filling of variables through the application. But now I need to post it to an url on submit. My .HTML form looks like this, but how to translate it...
13
by: deko | last post by:
I have a basic feedback form with a submit button. After the "send" button is clicked, I want the user to be redirected to a different page that says "Your message has been sent." How do I do...
8
by: Theadmin77 | last post by:
Ok ,i have to create a page to allow entry of user information;all fields must be validated and error displayed otherwise * First Name (limit 25 characters) * Last Name (limit 25...
1
by: starter08 | last post by:
Hi, I have a C++ routine(client-side) which uploads an xml file to a web server by making a socket connection and sending all the post request through that socket. On the server side I have a cgi...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.