dannybrazil Posted March 18, 2010 Share Posted March 18, 2010 Hello I wanted to create something that will show a different LINK if its internet explorer or another browser code: <![if !IE]><form action="#" method="post"> <input name="produto" value="'.$this->dados[$i]['codigo'].'" type="hidden" > <input TYPE="image" SRC="images/delete_bt.png" BORDER="0" name="acao" value="Excluir" > </form><![endif]--> <!--[if IE]><a href="javascript:void(0)" onclick="window.open(\'select_ok.php?produto='.$id.'&acao=Excluir\',\'\',\'width=100,height=100\')"><img src="images/delete_bt.png" border="0" /></a><![endif]--> Now in chrome and mozila its working fine BUT in explorer it doesnt work at all I can NOT see either of the links any help ? Quote Link to comment Share on other sites More sharing options...
Tazerenix Posted March 19, 2010 Share Posted March 19, 2010 use javascript: function ie() { if (navigator.appName == "Microsoft Internet Explorer") { document.write("<a href=\"javascript:void(0)\" onclick=\"window.open(\'select_ok.php?produto='.$id.'&acao=Excluir\',\'\',\'width=100,height=100\')\"><img src=\"images/delete_bt.png\" border="0" /></a>"); } else { document.write('<form action="#" method="post"> <input name="produto" value="'.$this->dados[$i]['codigo'].'" type="hidden" > <input TYPE="image" SRC="images/delete_bt.png" BORDER="0" name="acao" value="Excluir" > </form>'); } } then call it with <script type="text/javascript">ie()</script> And that should work. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.