woolyg Posted May 14, 2010 Share Posted May 14, 2010 Hi all, I'm making an AJAX call into a DIV, which is returning text, just fine. What I'd like to do is, when the text is, say, equal to '123', I'd like to do another ajax call, into a different DIV, that writes a different bit of text. The first Ajax Call is returning the following PHP: $text = $_GET['text']; if($text == "123"){ echo "<script>ajax_call_root('c/ajax.comment.logged_in.inc.php', 'vote_ajax_bottom');</script>"; } where 'c/ajax.comment.logged_in.inc.php' is the new php file to call, and 'vote_ajax_bottom'' is the target DIV. Can this be done? Cheers WOolyG Quote Link to comment Share on other sites More sharing options...
CodeMaster Posted May 15, 2010 Share Posted May 15, 2010 You cannot execute javascript by putting it in an object with innerHTML. What you can do is, when you receive the response from the php page, check in javascript if the value is 123 and then make another ajax request. 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.