open a link in IE only?

liunx

Guest
i was wondering if there is a way to have a link open only in IE.<br />
<br />
I know how to open a link in a new window, but if the user was using, say, Netscape, can a link open IE from there?<br />
<br />
THANKS!<!--content-->Indulging in a little discrimination are you? Rather mean on the netscape people eh what? LOL<br />
<br />
Perhaps you could find someone to write you a javascript/php etc that would then detect what browser the person is using and decide what content to add.<!--content-->so it is possible?<br />
<br />
i know it's a bit discriminatory, but that's the task i have been told to do from the 'higher-ups'..<!--content-->What server side languages does your server support? That will dictate who to ask. Unless it's for internal use? Then could you use javascript?<!--content-->we have a few servers here, we could use almost any language.<br />
<br />
if it can be done w/ javascript, that would be preferrable.<br />
<br />
the questions is, how?<br />
<br />
THANKS!<!--content-->With javascript you just need to adapt this script: <!-- m --><a class="postlink" href="http://www.w3schools.com/js/tryit.asp?filename=tryjs_crossbrowser2">http://www.w3schools.com/js/tryit.asp?f ... ssbrowser2</a><!-- m --><br />
<br />
With php, do what everyone else does and ask pyro (his IM status is working at the mo, so he may be busy. However, his bro was about earlier, so maybe...)<br />
<br />
Perhaps you could post in a forum of your choice, asking for a script to:<br />
<br />
Detect the users browser<br />
Print a hyperlink to the page if it is IE<br />
Print a message to Netscape to tell them to open IE...<br />
<br />
Hope this helps<!--content-->btw I've IM'd Pyro. He's busy at the mo but I've asked him to look later.<!--content-->Thanks a lot!<br />
<br />
i don't know all the IDs of people here, i'm glad u IM'd Pyro for me.<br />
<br />
I'll take a look at that link u supplied.<br />
<br />
i thought i might be able to accomplish this by fiddling around within the a href tag..oh well..<!--content-->Dave asked me to take a look at this quick... Here's the PHP solution:<br />
<br />
<?PHP<br />
$user_agent = $_SERVER['HTTP_USER_AGENT'];<br />
if (preg_match("/MSIE/",$user_agent)) {<br />
echo '<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.webdevfaqs.com">Web Dev FAQs</a>';<br />
}<br />
else {<br />
echo "You must use IE to view this page.";<br />
}<br />
?>and here's the javascript solution:<br />
<br />
<script type="text/javascript"><br />
user_agent = navigator.userAgent;<br />
if (user_agent.match(/MSIE/)) {<br />
document.write('<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.webdevfaqs.com">Web Dev FAQs</a>');<br />
}<br />
else {<br />
document.write("You must use IE to view this page");<br />
}<br />
</script>Ok, off to work again... ;)<!--content-->LOL - thanks Pyro!<!--content-->Thanks Pyro, and Dave!!!<br />
<br />
So i guess the best that's possible is to have the 'Must use IE' part, it's impossible to open a link in IE from other browsers?<!--content-->Happy to help. Also, yes, you can't open IE from other browsers... The best you can do is print a message (actually, the best would be to make your pages cross-browser, as Dave already stated)...<!--content-->thanks, yes that would be best..but it's outta my hands, it's up to the brainiacs i work for..;)<!--content-->someone just told me that it might be possible using VB, does that sound right?<!--content-->VB is IE only, so you could probably just use it to write the link... I would use PHP, as it will work for all browsers.<!--content-->I use Mozilla and I have had a IE window open on me before. I didn't look into how it was done, but I have seen it happen. Maybe it's something within my own settings I need to change, but again, it can happen.<!--content-->Hmm.. I'm a bit surprised about that. I'd think if anything, things like that would happen when using IE (due to the many bugs...)<!--content-->
 
Back
Top