Click here to Skip to main content
12,509,728 members (43,116 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: jQuery
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 31-Jan-13 18:19pm
Comments
JemiM 1-Feb-13 0:23am
   
did you add the jquery plugin?
Tadit Dash 1-Feb-13 3:07am
   
Can you tell which plugin you have used for Session?

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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

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

// 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...
Comments
Tadit Dash 1-Feb-13 5:43am
   
Thanks for accepting.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160929.1 | Last Updated 1 Feb 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100