473,386 Members | 1,823 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,386 software developers and data experts.

Differences in form handling btw Mozilla and IE?

Hi!

I'm used to have Mozilla for testing my PHP sites when I'm coding. The
site's nearly finished, now I've made a test with the Internet
Exlporer... guess what... failed.

The problem: I'm using a form that submit's (POST) its data via three
different image buttons (depending on which button you click,
something different should happen):

<form action="id.php" method="post" name="form2">
<input name="id1" type="image" id="id1" value="id1" src="id1.gif">
<input name="id2" type="image" id="id2" value="id2" src="id2.gif">
<input name="id3" type="image" id="id3" value="id3" src="id3.gif">
</form>

(This is kind of a summary of the code!)

Now while with Mozilla everything works perfect, the Internet Explorer
can't handle this: Not one of the variables id1, id2 or id3 is set in
the target script - but it is in Mozilla. Any solutions / workarounds?
I have several hidden fields in the original source, so I don't want
to use URL variables.

-- Nicolas
Jul 17 '05 #1
3 6571
Hi Nicolas!

On 19 Feb 2004 08:44:10 -0800, ni************@slb.de (Nicolas Keller)
wrote:
Hi!

I'm used to have Mozilla for testing my PHP sites when I'm coding. The
site's nearly finished, now I've made a test with the Internet
Exlporer... guess what... failed.

The problem: I'm using a form that submit's (POST) its data via three
different image buttons (depending on which button you click,
something different should happen):

<form action="id.php" method="post" name="form2">
<input name="id1" type="image" id="id1" value="id1" src="id1.gif">
<input name="id2" type="image" id="id2" value="id2" src="id2.gif">
<input name="id3" type="image" id="id3" value="id3" src="id3.gif">
</form>

(This is kind of a summary of the code!)

Now while with Mozilla everything works perfect, the Internet Explorer
can't handle this: Not one of the variables id1, id2 or id3 is set in
the target script - but it is in Mozilla. Any solutions / workarounds?
I have several hidden fields in the original source, so I don't want
to use URL variables.
It sets id1.x and id1.y

HTH, Jochen

-- Nicolas


--
Jochen Daum - Cabletalk Group Ltd.
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces.
http://sourceforge.net/projects/phpdbedittk/
Jul 17 '05 #2
> It sets id1.x and id1.y

HTH, Jochen


That was the point *phew* In fact, both browsers set the variables
$varname_x and $varname_y , only Mozilla adds the third variable
$varname - the one I used.

Thanks god it was that easy and thanks Jochen! :-)

-- Nicolas
Jul 17 '05 #3
(Note crosspost and follow-ups to ciwah.)

Nicolas Keller wrote in thread "Differences in form handling btw
Mozilla and IE?":
The problem: I'm using a form that submit's (POST) its data via three
different image buttons (depending on which button you click,
something different should happen):

<form action="id.php" method="post" name="form2">
<input name="id1" type="image" id="id1" value="id1" src="id1.gif">
<input name="id2" type="image" id="id2" value="id2" src="id2.gif">
<input name="id3" type="image" id="id3" value="id3" src="id3.gif">
</form>

(This is kind of a summary of the code!)
Eh, since I've moved this discussion to ciwah, I'll question whether
that summary involved removing alt attributes. :-)
Now while with Mozilla everything works perfect, the Internet Explorer
can't handle this: Not one of the variables id1, id2 or id3 is set in
the target script - but it is in Mozilla.


My interpretation of the HTML4.01 specification leads me to believe
that Internet Explorer behaves incorrectly [1]. The INPUT that's
used to submit a form *is* a successful control, which, by HTML
rules, means its control-name/current-value pair is included as part
of the form data set: "Every successful control has its control name
paired with its current value as part of the submitted form data set"
(HTML4.01, sec. 17.13.2).

By searching for previous comments, I came across:
http://www.cs.tut.fi/~jkorpela/forms...on.html#submit

J. Korpela says "the value of the VALUE attribute is ignored, and the
coordinates of the clicked location are passed instead". I can't
find where this is written in the specification. Section 17.4.1
states:

| The submitted data includes name.x=x-value and name.y=y-value where
| "name" is the value of the name attribute, and x-value and y-value
| are the x and y coordinate values, respectively.

So, the submitted data *includes* the coordinates of where the
pointing device was when it was used to submit the form [2]; the
spec. does not say the control-name/current-value pair of the image
submit button is not also included as part of the form data set. J.
Korpela then goes on to say that whether this information should be
included "is somewhat debatable and depends on the interpretation of
wordings in the specification". I cannot see why this is the case.

In the thread <http://groups.google.com/groups?th=e5f4dc91c1b1eda2>,
linked to by the above document, it's explained why an image submit
button's control-name/current-value pair should be submitted as part
of the form data set, and why browsers not doing so are in violation
of the specification. I agree with this conclusion.

On the other hand, A. Flavell's document:
http://ppewww.ph.gla.ac.uk/~flavell/www/trysub.html
says that "it would be unwise to try to rely on this behaviour, as
it's not in the specifications".

I'm confused. Is my interpretation wrong?
[1] What makes me think twice are the browsers that don't behave in
accordance with my interpretation (among others, no doubt): Opera
7.10, Opera 6.0, Opera 5.12, IE 6.0, Netscape 4.74.

[2] The exact words of the specification are: "When a pointing device
is used to click on the image...". Is there any reason why a
pointing device *must* click to activate something?

--
Jock
Jul 17 '05 #4

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

Similar topics

8
by: atomo | last post by:
Hi, i got a problem with variable handling with mozilla(0.7). These lines of code works fine on IE(6), but they doesn't on Mozilla: echo" function check(){ if( ".$name.".value!=\"\" ) {...
14
by: Bern | last post by:
what are all the diferences between the two?
12
by: Jim Tome | last post by:
Hi, I am trying to change and pass the value of a hidden input type on a form tag to a cgi processing script based on the value of a checkbox within the form: function CheckBoxes () { if...
9
by: Artist | last post by:
Mozilla and IE works different with Javascript. I have Javascript Code which works fine with Mozilla and it breaks with Internet Explorer. I like to convert my code to work with both the...
0
by: Reimar Bauer | last post by:
Dear all I have written a data handling tool in php and probably you all know already what are my problems. Lets explain: I have found some strange behaviour in Internet Explorer filling...
3
by: Roger Withnell | last post by:
My NavBar menu code uses toElement.parentNode.id to check if the mouse has moved to a specific parent or off the menus onto the page. Moving off the menus, IE6 and NN8 give toElement.id as BODY ...
0
by: chopsnsauce | last post by:
Hello, I've just written, my first .NET Windows application and I've noticed that when running my App in the design time enviroment the error handling works like this: Say I've gat a method...
1
by: ynotssor | last post by:
Hello, can someone please tell me the correct way to use "curl" to complete an online form? I am trying to eventually retrieve my account balance via a cron job that will email me the parsed output...
6
by: Stanimir Stamenkov | last post by:
I have a form without a submit button like: <form name="form1" action="" onsubmit="alert('submit ' + this.name);"> <div> <label>Field 1: <input type="text" name="field1"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.