keenyounglearner Posted June 8, 2009 Share Posted June 8, 2009 Hi there my code is: ajReq.onreadystatechange = function(){ if(ajReq.readyState == 4){ if(connection == "rf") { document.getElementById("tempdiv").innerHTML=ajReq.responseText; alert(); } } } Gives me the error: alert is not a function, I have tried calling a global function instead and alerting from that but that gives the same error... Any help really appreciated. Quote Link to comment Share on other sites More sharing options...
gevans Posted June 8, 2009 Share Posted June 8, 2009 You have to pass an arguemtn to alert (the string to alert) alert('write in me'); Quote Link to comment Share on other sites More sharing options...
keenyounglearner Posted June 9, 2009 Author Share Posted June 9, 2009 Whoops forgot to put that in in my code snippet. Ya I have done that... The error is still there Quote Link to comment Share on other sites More sharing options...
trq Posted June 9, 2009 Share Posted June 9, 2009 Obviously one of your conditions isn't being met. Quote Link to comment Share on other sites More sharing options...
keenyounglearner Posted June 9, 2009 Author Share Posted June 9, 2009 Huh? Why do you say that? The innerhtml is executing so the condition is being met. I don't why a condtional not firing would cause alert to not register as a function. 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.