2

How can i get the sessionID in the html area component , in the sidebar , using javascript without referring to the connection.js , Is this possible

4

Yes. It is stored in a cookie named sid so a

var sid = document.cookie.match('sid=([^;]*)')[1];

Should do the work. Or if you want something simpler to read

var strCookies = document.cookie;
var cookiearray = strCookies.split(';')
for(var i=0; i<cookiearray.length; i++){
  name = cookiearray[i].split('=')[0];
  value = cookiearray[i].split('=')[1];
  if(name == 'sid')
     sid = value;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.