Brandtley,
Here it is:
This is the HTML:
<input type="image" src="/images/saveandcontinue.png" value="Save Changes and
Continue" name="saveandcontinue" id="saveandcontinue" tabindex="<?php echo
set_tabindex(); ?>" width="233" height='33' /> <span id="shiftdiscard"><a
href="/campadmin/basic_info.php">Discard changes</a></span>
And this is the test that was working at the end of May when I handed the code
to the client:
if (isset($_POST['saveandcontinue'])) {
if ($_POST['saveandcontinue'] == 'Save Changes and Continue') {
Processing code here
}
}
The form fell below the above test and called the page that all this is on when
submitted.
I tested in Chrome and the result was the $_POST['saveandcontinue'] existed,
but in Firefox 5.0 (and maybe other versions) what I was seeing was
$_POST['saveandcontinue_x'] and $_POST['saveandcontinue_y'].
$_POST['saveandcontinue'] did not exist. I checked this but dumping the POST
variables and looking through them.
Andy Couch found the following:
Firefox 4 and up removed the value attribute from the input element when the
type is set to an image. This removal wasn't arbitrary, but part of the HTML5
specification.
http://www.whatwg.org/specs/web-apps/current-work/multipage/number-state.html#image-button-state
The element's value attribute must be omitted.
So it looks like this is the way of the future.
Jeff
On Jul 12, 2011, at 4:22 PM, Brandtley McMinn wrote:
> I'm on windows, but I've never heard of this from any of my Mac friends. Can
> you copy+paste the the info firefox is returning. Not quite understanding
> what you mean by saveandcontine_x/y.
>
> - Brandtley
>
> On 7/12/2011 12:28 PM, Jeffrey Bernier wrote:
>> Hello everyone,
>>
>> I've just run into an interesting problem with Firefox 5.0 on Mac.
>>
>> I have a form on a website which has a input type of image to display a
>> graphic for the submit button. The site was developed and published before
>> FireFox 5.0 was released and everything was working fine. Now with Firefox
>> 5.0, the input image, named saveandcontinue, is posted as saveandcontinue_x
>> and saveandcontinue_y rather than just saveandcontinue.
>>
>> Has anyone else run into this and if so any insights on how to resolve it
>> other than replacing the input image with a standard button?
>>
>> Jeff
>>
>
> --
> Our Web site: http://www.RefreshAustin.org/
>
> You received this message because you are subscribed to the Google Groups
> "Refresh Austin" group.
>
> [ Posting ]
> To post to this group, send email to [email protected]
> Job-related postings should follow http://tr.im/refreshaustinjobspolicy
> We do not accept job posts from recruiters.
>
> [ Unsubscribe ]
> To unsubscribe from this group, send email to
> [email protected]
>
> [ More Info ]
> For more options, visit this group at
> http://groups.google.com/group/Refresh-Austin
--
Our Web site: http://www.RefreshAustin.org/
You received this message because you are subscribed to the Google Groups
"Refresh Austin" group.
[ Posting ]
To post to this group, send email to [email protected]
Job-related postings should follow http://tr.im/refreshaustinjobspolicy
We do not accept job posts from recruiters.
[ Unsubscribe ]
To unsubscribe from this group, send email to
[email protected]
[ More Info ]
For more options, visit this group at
http://groups.google.com/group/Refresh-Austin