Page 1 of 1

passing submit id via form.submit()

Posted: Wed Jul 12, 2006 1:36 pm
by kendall
I have been searching through the forums for an answer but i dont think i was using the right terms so i figured i'd post this up...

i have a form with to image button used as submit buttons.
both have different values that are relevant for the execution of PHP code
However both have a javascript confirm prompt that when success executes the form to submit
However i note that while Firefox is able to POST the submit value of the clicked submit button regardless that is is submitted via the form.submit() command...
With IE the submit value is not passed as a POST

What gives here...?
Are there any workarounds u recommend?

Kendall

Posted: Wed Jul 12, 2006 11:22 pm
by Benjamin
IE is stingy with javascript variable names. If your using a

Code: Select all

<div id="blah">blah</div>
in your page, and then try to use blah as a javascript variable name, things might get wacky. Look out for that.

Besides that, without seeing your code, it's hard to say.

Posted: Thu Jul 13, 2006 7:16 am
by phppage
I had this problem as well. The way I got round this is to set a hidden input field and change the value using onclick js events depending on which submit button was click.

[SOLVED]

Posted: Thu Jul 13, 2006 8:43 am
by kendall
phppage wrote:I had this problem as well. The way I got round this is to set a hidden input field and change the value using onclick js events depending on which submit button was click.
Yeah thats what i ended up doing...apparantly the "IMAGE" input element reutrn only the mouse x and y cord in IE...stupid @#%

Kendall

Re: [SOLVED]

Posted: Thu Jul 13, 2006 2:02 pm
by phppage
kendall wrote: Yeah thats what i ended up doing...apparantly the "IMAGE" input element reutrn only the mouse x and y cord in IE...stupid @#%
Kendall
Yep, IE can really get you down.