passing javascript value in html url link

Posted by pradeep on Stack Overflow See other posts from Stack Overflow or by pradeep
Published on 2010-03-15T08:03:32Z Indexed on 2010/03/15 8:09 UTC
Read the original article Hit count: 177

Filed under:
|
|
$.post("/diabetes/ropimages/getcount.php",{pid:$("#patient_id").val()} ,function(data1){
//alert(data1);
var count = data1;
var pid = $("#patient_id").val();
var rid;
for( var i = 1 ; i <= count ; i++)
{
var link ='<img src="/diabetes/ropimages/thumbpicdisplay.php?pid=+pid+&rid=1" />';
$("#content1").empty().html(link);
}
});

i am trying to pass pid value in url ..but its taking directly as +pid+ as value ..how do i give it the value of pid. and how do i print 3 images in a div ? like the one in code

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript