I am using jQuery session in my master page. Anything I’m missing?
Code:
<script type="text/javascript" language="javascript" src="js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$.session("lnkID","A1")
});
</script>
Error:
Microsoft JScript runtime error: Object doesn’t support this property or method
By your example alone, you’re missing a reference to the required files, and you’re not wrapping your jQuery code in script tags. You need to reference not only jquery-source, but jquery-json, and jquery-session as well.
Once you’ve got those in place, you need to place your logic within script tags:
See the following demo for an example: http://www.jaysalvat.com/session/test1.html
Lastly, the
languageattribute of thescripttag is deprecated. You can do away with it, but keep thetypeattribute.