jamesxg1 Posted January 20, 2010 Share Posted January 20, 2010 Hi Everyone! How do I use a javascript var in jquery ? function postNewAnswerAlerts() { if (http_request.readyState == 4) { if (http_request.status == 200) { var result = http_request.responseText; $('div#question').load('responder.php?mode=readquestion&id='+result).show().fadeIn('slow'); } } } I need to use this javascript var var result = http_request.responseText; in $('div#question').load('responder.php?mode=readquestion&id='+result).show().fadeIn('slow'); Many thanks James. Quote Link to comment Share on other sites More sharing options...
jamesxg1 Posted January 20, 2010 Author Share Posted January 20, 2010 B to the U to the M to the P Quote Link to comment Share on other sites More sharing options...
jamesxg1 Posted January 20, 2010 Author Share Posted January 20, 2010 BUMP Quote Link to comment Share on other sites More sharing options...
trq Posted January 20, 2010 Share Posted January 20, 2010 the code you have should work. However, one question. Why are you using your own Ajax implementation? jQuery provides a much more user friendly interface. Quote Link to comment Share on other sites More sharing options...
jamesxg1 Posted January 20, 2010 Author Share Posted January 20, 2010 It doesn't . Good question ? lmao. Many thanks James. 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.