i have this jquery function that i want to pass topic
parameter to, i just dont know how to pass it lol :)).
the jquery function:
function loadPage(url) //the function that loads pages via AJAX
{
url=url.replace('#page',''); //strip the #page part of the hash and leave only the page number
$('#loading').css('visibility','visible'); //show the rotating gif animation
$.ajax({ //create an ajax request to load_page.php
type: "POST",
url: "load_page.php",
data: 'page='+url, //with the page number as a parameter
dataType: "php", //expect html to be returned
success: function(msg){
if(parseInt(msg)!=0) //if no errors
{
$('#change-container').html(msg); //load the returned html into pageContet
$('#loading').css('visibility','hidden'); //and hide the rotating gif
}
}
});
}
and this is the url:
http://localhost/final/home.php#page2&topic=jquery
when i click this link, the page load fines(using jquery), but its not passing the topic parameter!
<h3 class="timeline"><?php echo $_GET["topic"]; ?> echo</h3>
so this wnt echo, because it cnt access the topic param!! if you guys know what i mean :))