I'm trying to load a div. Load () I have tried:
function newPage (p_id) {var id = p_id; $ ("# Div") load ("content.php id = id?") .; } Now the value of the php id does not get, but the string is getting the "id" value. Then I tried:
function newPage (p_id) {var id = p_id; Switch (id) {case 1: $ ("# div"). Load ("content.php? Id = 1"); break; Case 2: $ ("# div") Load ("content.php? Id = 1"); break; Default: Alert ("default"); break; }} In this case the default is executed, even if the value of the ID is 1 or 2.
Where am I going?
You need it -
$ ("# div" ). Load ("content? Php id =" + id);
No comments:
Post a Comment