javascript - AJAX Getting Data, Post Back and Get Again -


I am trying to do the following with AJAX:

  1. Visitor

  2. Visit the AJL URL 1 And it gives a random code, for example 1357 .

  3. Then, I want to go to URL 2 http: //www.mywebsite.com/url2.php?code=1357&action=ask (< Code> 1357 url1 is a variable). URL 2 will confirm that the last code returns

How do I do this?

Thanks in advance. / P>

Try it out.

  $ Get ("http: //www.mywebsite.com/url1.php"). (Function (data) {$ .get ("http://www.mywebsite.com/url2.php", {code: data, verb: "ask"}) .one (function (next) {$ (" # Result "). Html (next);});});  

Comments