ShadowMage Posted June 22, 2010 Share Posted June 22, 2010 I've come across yet another bug. Though I was positive that this sort of thing could be done. I have a button link, like so:<a href='http://www.google.com'><input type='button' value='click here' /></a>and it works just fine in FF, but IE doesn't work. Clicking the button does nothing. Can anyone confirm that this is a bug in IE? How do I fix it? If I have to, I'll use JavaScript, but I didn't really want to do that since it's just redirecting to a different part of my site. Link to comment Share on other sites More sharing options...
Synook Posted June 22, 2010 Share Posted June 22, 2010 Inputs aren't really meant to be wrapped in anchor tags (though it is valid) - maybe you want a <button> instead? Link to comment Share on other sites More sharing options...
ShadowMage Posted June 22, 2010 Author Share Posted June 22, 2010 Inputs aren't really meant to be wrapped in anchor tags (though it is valid) - maybe you want a <button> instead?Ah, <button> right. Forgot about that! I'll try it, let you know if it works.EDIT:Unfortunately, that's not working either. Link to comment Share on other sites More sharing options...
thescientist Posted June 22, 2010 Share Posted June 22, 2010 I guess you could just use an image, or a styled div. Link to comment Share on other sites More sharing options...
Ingolme Posted June 22, 2010 Share Posted June 22, 2010 If you want a button that acts like a link, just put it inside a form: <form action="http://www.google.com" method="get"><div><input type="submit" value="Click here" /></div></form> You can style the form and <div> elements to appear inline if necessary. Link to comment Share on other sites More sharing options...
ShadowMage Posted June 22, 2010 Author Share Posted June 22, 2010 Hmm....thanks for the suggestions guys, but I can't use an image or a div because this button is part of a menu which is made up of other buttons and it would look out of place. I don't know if I like the form idea as that seems to be a lot of extra markup just to make a button link. I think I'm going to use JavaScript. I won't have to worry about it being disabled because this is on an intranet and all of our browsers have JavaScript enabled. Once again, thanks for the suggestions! :)Why can't IE just play nice for once.... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.