javascript - strange debugging issue -
my code changes not being reflected in ie or ff.
in ie: commented out alert('start'), still see alert when stop-restart visual studio debugger.
in ff: same code change, none of alerts show @ all. uncommented alert('start') , still dont see in ff.
i tried setting port stay fixed @ 5204. stopped asp.net development server prior starting debugger again. still doesnt help.
environment: vs 2010 ie7 , ff3.6.
code
simplexhr = { doxhr: function (container, url) { //alert("start"); if (!document.getelementbyid || !document.createtextnode) { alert("no js support"); return; } simplexhr.outputcontainer = document.getelementbyid(container); if (!simplexhr.outputcontainer) { alert("no output container"); return; } var request; try { //alert("mozilla ajax"); request = new xmlhttprequest(); alert(request); } catch (error) { try { //alert("ie ajax"); request = new activexobject("microsoft.xmlhttp"); } catch (error) { return true; } } request.onreadystatechange = function () { if (request.readystate == 1) simplexhr.outputcontainer.innerhtml = 'loading...'; } alert("made try ajax"); request.open('get', url); //alert("ready state: " + request.readystate); } }
update
on further testing, problem due caching. but, happens when use "unobtrusive javascript" or javascript inside own *.js file linked in header:
<script src="scripts/simplexhr.js" type="text/javascript"></script>
moving code page - viewing source - javascript updates everytime no caching issues. there better way perform "unobtrusive javascript"? or should renamed "unproductive javascript" :p
sounds might browser cache issue. try clearing cache in each browser. pick changes.
you verify doing view-source in browser , see if you're getting latest code.
Comments
Post a Comment