javascript - Use a cookie value in a getJson call -
i want use getjson call this"
$.getjson("cfc/getmember.cfc?method=getuser&returnformat=json&queryformat=column",{"memberid":userid}, function(res,code)
the userid stored cookie - thought i'd use:
function checkcookie(){ var userid=getcookie("uid"); }
now (as i'm sure cal tell) i'm new javascript might problem - i'm after advice on how use cookie value in getjson call.
thanks!
simon
assuming getcookie()
function defined , correctly retrieves cookies, need define userid
before make call $.getjson:
var userid=getcookie("uid"); $.getjson("cfc/getmember.cfc?method=getuser&returnformat=json&queryformat=column", {"memberid":userid}, function(res,code) {});
Comments
Post a Comment