473,322 Members | 1,405 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,322 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 6568
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.