I have an <input>
element inside an <a>
element, meaning IE8 ignores the <a>
element's href attribute when clicked. It works fine on all other browsers. Is there a way to determine whether a new tab/window opened? I can then give the user a normal/ugly link to click if it didn't work.
Code example:
<a target="_blank" href="http://somelink.com"><input type="button" class="standard_button_styling" /></a>
What I've tried:
<input>
tag and style the <a>
tag: I had trouble making it look just like my other buttons (maybe due to native browser styling) and I don't want it to look worse for everyone to fix a problem with only IE8.You can try to use <button>
instead of <input>
but I am not sure if this will solve the problem.
Or just use <form>
.
<form method="get" target="_blank" action="yourlink">
<input type="submit" value="Click" />
</form>