Page 1 of 1

Get the prarameter from URL by jquery

Posted: Mon Sep 05, 2011 10:01 pm
by Lphp
I have link

Code: Select all

<a href="ajaxupdate.php?hit=1&reid=<?php echo $row['id']; ?>" id="tag" name="tag"> link one</a>
In jquery
I have
<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();
}
});
in my ajaxt

Code: Select all

 $tag=htmlspecialchars($_GET['tag']); I only get the value hit lost the part reid , why?? :( 
	echo($tag);