how to set session values using javascript.
Well, as others have already stated that Session is a server side thing and Javascript is a client side thing.
Though, if you want to set a session via Javascript, you can do it using XMLHttpRequest.
Read about it here:
XMLHttpRequest[
^]