View Single Post
Old 02-19-2013, 07:48 PM  
milkhead
Confirmed User
 
Join Date: Sep 2009
Posts: 186
javascript question??????

I am working on a project that requires me to use JavaScript ?buttons and etc? and when doing so I found that ie does not pass the refer to another page when you click a link. I did some researcher and found this script, but I am not sure how to implement or how to use so maybe there is someone who can help, how do I make this work?

<script type="text/javascript" >
function redirect(url) {
if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){
var referLink = document.createElement('a');
referLink.href = url;
document.body.appendChild(referLink);
referLink.click();
} else {
location.href = url;
}
}
</script>
milkhead is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote