У меня есть эта функция jquery, в которую я хочу передать параметр topic
, я просто не знаю, как передать его lol:)).
функция jquery:
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
}
}
});
}
и это URL:
http://localhost/final/home.php#page2&topic=jquery
когда я нажимаю эту ссылку, страница загружается штрафами (с использованием jquery), но она не передает параметр темы!
<h3 class="timeline"><?php echo $_GET["topic"]; ?> echo</h3>
так что это wnt echo, потому что он не может получить доступ к параметру темы !! если вы, ребята, знаете, что я имею в виду:))