Jump to content


Photo

IE and <input type="image" />


  • Please log in to reply
3 replies to this topic

#1 SharkBait

SharkBait
  • Members
  • PipPipPip
  • Advanced Member
  • 845 posts
  • LocationMetro Vancouver, BC

Posted 08 August 2006 - 08:52 PM

Am I doing this wrong??

<div style="margin-left: 250px; width: 100px; padding: 5px;">
				<input type="hidden" name="uid" value="<?php echo $uid;?>" />
				<input type="image" src="images/submit.gif" value="Submit" name="submit" title="Submit"/>
				<!-- <input type="submit" value="Submit" name="submit" />  -->
			</div>

In Firefox it works fine.  The script is executed with no issues. In IE, it just refreshes itself. 
I have a

<?php 
if(isset($_POST['submit'])) {
  echo "I WAS SUBMITTED";
}
?>

Firefox shows the I WAS SUBMITED but IE does not.  I commented the <input type="image" out and used the regular <input type="submit" and it works. but I'd rather use the graphic as the button than CSS the form's button.



#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 08 August 2006 - 08:56 PM

images used as 'submit' buttons do not return their 'name'; they return the x and y co-ordinates of where they were clicked relative to the upper-left corner.  Check for $submit_x and/or $submit_y being set assuming the submit is named 'submit'
Legend has it that reading the manual never killed anyone.
My site

#3 SharkBait

SharkBait
  • Members
  • PipPipPip
  • Advanced Member
  • 845 posts
  • LocationMetro Vancouver, BC

Posted 08 August 2006 - 09:00 PM

Ahh

I did not know that.

Cool thanks :)

#4 Daniel0

Daniel0
  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 09 August 2006 - 07:27 AM

Instead of
<input type="image" src="images/submit.gif" value="Submit" name="submit" title="Submit"/>
I think you should use this:
<button type='submit' name='submit'><img src='images/submit.gif' alt='submit' /></button>

That will make it an actual submit button.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users