Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Friends

i m using session in jquery but it is return error


Microsoft JScript runtime error: Object doesn't support property or method 'session'



i m use

$.session("example", "mysession");
alert($.session("example"));


pls help me

Thanks and Regards
pardeep barak
Posted
Comments
Jameel VM 1-Feb-13 0:23am    
did you add the jquery plugin?
Can you tell which plugin you have used for Session?

1 solution

Follow the link - session handling in jquery[^].

Assuming you're referring to this plugin[^], your code should be:

JavaScript
// To Store
$(function() {
    $.session.set("myVar", "value");
});


// To Read
$(function() {
    alert($.session.get("myVar"));
});

Before using a plugin, remember to read its documentation in order to learn how to use it. In this case, an usage example can be found in the README.markdown file, which is displayed on the project page.
Thanks...
 
Share this answer
 
Comments
Thanks for accepting.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900