views:

38

answers:

2

Hi to all, i wan't to pass a variable without using get to php, so, i'm using post with jquery, but i can't write the result into the document (refresh all the page)

here is the code:

$.post("/"+$(this).attr("href"),{returnto:$(this).attr("rel")},function(a){$(document).html(a);});return false;});
A: 

The document is not the place to write your result as the document is the meta envelope around the html page you see. Rather use the body:

$("BODY").html("MY ANSWER IS: "+a);
Steffen Müller
thanks for your answer, but the page should reload, with new css, etc.
CuSS
Then kill the return false.
Cryophallion
A: 

A form was used.

CuSS