//Makes the AJAX Call that marks an item as viewed, then redirects to the appropriate URL function goToLink(url, updateID) { //Build an XMLHTTP object var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) // JScript gives us Conditional compilation, we can cope with old IE versions. // and security blocked creation of the objects. try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } @end @*/ if (!xmlhttp && typeof XMLHttpRequest!='undefined') { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp=false; } } if (!xmlhttp && window.createRequest) { try { xmlhttp = window.createRequest(); } catch (e) { xmlhttp=false; } } //Make a get request to mark item as read xmlhttp.open("GET", "/App_Info/MarkItemRead.aspx?ID="+updateID,true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { //Request complete... redirect the user window.location=url; } } xmlhttp.send(null) }