javascript - if page link is like test.html?a=1&b=2 then how load function will work getting value of a and load particular div? -


my html page is:

test.php?a=1&b=2 

send response post.php abc.php when response callback post.php , test.php. (test.php -> post.php -> abc.php) sending (abc.php -> post.php -> test.php) receiving test.php main page post.php , abc.php both jquery response page

how load function work including $_get value in page?

when use this:

$("#div").load("test.php #div") 

result: load div data , not getting a , b value

$.ajax({      method: "post",      url: "abc.php",      data: datastring }) .done(function( msg ) {     $("#div").load("test.php?a="+xx+ "#div"); } 

in abc.php page have send a value in echo echo $xx; echo a value response data in session $("#div").load("test.php #div") getting session data cart items on particular div

but when used this

   $("#div").load("test.php?a="+xx+ "#div"); 

result : load whole page in div instead of just div load getting value of a

i want a value , only div load not whole page

you need use $("#div").html('whatever div content shouldbe').


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -