Code works in Mozilla but not IE

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
r337ard
Forum Commoner
Posts: 29
Joined: Tue Apr 15, 2003 6:14 am
Contact:

Post by r337ard »

[Admin Edit: Post moved from register_globals sticky thread]

mm, iv read this article over several times. i thaught i understood it but i cant get my code to work (in IE, works fine in moz/phoenix). anyone know what im doing wrong?

Code: Select all

<?php
if (!empty($_REQUEST&#1111;'Home']))
&#123;$Home = 'ok';&#125; else &#123;$Home = 'nope';&#125;;
if (!empty($_REQUEST&#1111;'Forum']))
&#123;$Forum = 'ok';&#125; else &#123;$Forum = 'nope';&#125;;
if (!empty($_REQUEST&#1111;'Contact']))
&#123;$Contact = 'ok';&#125; else &#123;$Contact = 'nope';&#125;;
if (!empty($_REQUEST&#1111;'Gaming']))
&#123;$Gaming = 'ok';&#125; else &#123;$Gaming = 'nope';&#125;;
if (!empty($_REQUEST&#1111;'Gallery']))
&#123;$Gallery = 'ok';&#125; else &#123;$Gallery = 'nope';&#125;;
?>

<form action="test.php" method="get">
<input type="image" name="Home" src="button_home.gif" height="22" valign="bottom" value="Home">
<input type="image" name="Forum" src="button_forums.gif" height="22" value="Forum" />
<input type="image" name="Gallery" src="button_gallery.gif" height="22" value="Gallery" />
<input type="image" name="Gaming" src="button_onlinegaminginfo.gif" height="22" value="Gaming" />
<input type="image" name="Contact" src="button_contact.gif" height="22" value="Contact" />
</form>

<?
echo "home = $Home<br>";
echo "forum = $Forum<br>";
echo "gallery = $Gallery<br>";
echo "gaming = $Gaming<br>";
echo "contact = $Contact<br>";
?>
i broke it all up because there will be other content going around it when i get it working properly. i just dont know why this doens't work in IE at all. IE posts the image coordinates for the input but not the value, and moz posts all the info. dont know why either is happening :(
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

bumping this 'cause I moved it from the sticky and it ended up half way down the page.

Mac
airo
Forum Commoner
Posts: 31
Joined: Thu Apr 24, 2003 4:07 pm

Post by airo »

This doent even sound like it belongs in the PHP forum due to its a client side synax error.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Knew there was something I meant to do with the thread... </brain fart>

Mac
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/input_image.asp
Remarks

The x-coordinate is submitted under the name of the control with .x appended, and the y-coordinate is submitted under the name of the control with .y appended. Any value property is ignored. The src property specifies the IMG element.
and the link that they refer to in Standards Information is http://www.w3.org/TR/REC-html32.html
type=image
...
In the submitted data, image fields are included as two name/value pairs. The names are derived by taking the name of the field and appending ".x" for the x value, and ".y" for the y value.
airo
Forum Commoner
Posts: 31
Joined: Thu Apr 24, 2003 4:07 pm

Post by airo »

twigletmac wrote:Knew there was something I meant to do with the thread... </brain fart>

Mac
Heh, sok, we all get em.
Post Reply