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

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -