Get the prarameter from URL by jquery
Posted: Mon Sep 05, 2011 10:01 pm
I have link
In jquery
I have
Code: Select all
<a href="ajaxupdate.php?hit=1&reid=<?php echo $row['id']; ?>" id="tag" name="tag"> link one</a>I have
in my ajaxt<script type="text/javascript" >
$(function() {
$(".like_button").click(function(){
var link = $(this).attr("href") ;
var com_data='tag='+link;
alert(com_data); I get what I want in here
$.ajax({
url: "ajaxt.php",
type: "GET",
data: com_data,
cache: false,
success: function(html){
$("#com_data").append(html);
$("#flash").hide();
}
});
Code: Select all
$tag=htmlspecialchars($_GET['tag']); I only get the value hit lost the part reid , why?? :(
echo($tag);