jquery get href value and put into ajax.load

dinsolatorqq

New Member
I have a page where ID is generated dynamically and be fetch from database and I put the result inside \[code\]<a>\[/code\] tag :\[code\]<?php while($row = mysql_fetch_array($result)) { ?> <a href="http://stackoverflow.com/questions/3845832/<?php echo $row['id']; ?>" onclick="myfunc(); return false;">ID Number 1</a><br /> <a href="http://stackoverflow.com/questions/3845832/<?php echo $row['id']; ?>" onclick="myfunc(); return false;">ID Number 2</a><?php } ?>\[/code\]and when user click the link, the javascript myfunc() function will be trigger.\[code\]function myFunc(){ $("#div").load("get_id.php?","id="+"SHOW THE $row['id'] HERE"); } \[/code\]But I don't know how to retrieve href value and put it inside the \[code\]load()\[/code\] method. Can someone show me the correct way? Thank you-mike
 
Back
Top