Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

LastLine

macrumors 65816
Original poster
Aug 24, 2005
1,313
21
Answer: http://www.peterbe.com/plog/button-tag-in-IE

Why have a button anyway? You should just make the thumbnail a link.

I'd rather use the thumbnail by preference, the trouble was I couldn't figure out how to make the thumbnail work in the same way as my button is - here's the code that my button uses

Code:
echo '</tr><tr><td class="photo"><br>'.$trimname.'<br><img src="'.$file.'" alt="'.$file.'"/><p><center><form method="post" action="displaypic.php" class="button"><input type="hidden" name="pass" value="'.$trimname.'.jpg"><br><button>"View</button></form></center></td>';
Trouble is I couldn't find a non-button way of passing on the information in the form (the displaypic.php uses the ".$trimname.'.jpg" information in the hidden input to check which photo it's meant to display. Hopefully you'll see what I mean.
 
In order to get this to work in IE, you'll have to use the <input> tag rather than the <button> tag as far as I know. I don't think that you can get around this.

I'd rather use the thumbnail by preference, the trouble was I couldn't figure out how to make the thumbnail work in the same way as my button is

If you'd like to make your thumbnail the link, then why not just put anchor tags around the image tag?

Code:
echo '<A href="displaypic.php?'.$trimname.'"><IMG src="'.$file.'" alt="'.$file.'"/></A>';

I don't know if that exact code will do what it's supposed to do given your variable names and such, but I think it's a start...Also notice that the style of sending information to displaypic.php is no longer a 'post' style, it's a 'query string' now. Up to you in terms of how you want to design it, but that should make your code work in IE as well as any other browser.

I hope this helps =).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.