.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Steve Jackman
Imran Ghani
Santhakumar Munuswamy

Home >> Forum >> JavaScript/VBScript >> Post New QuestionBookmark and Share Subscribe to Forum

how to store a array in cookie in javascript

Posted By: jay     Posted Date: April 23, 2010    Points:2   Category :JavaScript/VBScript
hi,

how to store a array in cookie in javascript

i have an array in javascript
var arr=new Array();
arr[1]=10;
arr[2]=20;


i want to store this array in cookie so how can i do it.

Responses
Author: Lalij Mer             
Posted Date: April 28, 2010     Points: 5   

try this code sample

function saveShortList(title){
if( $.cookie('shortlist') )
{
$.cookie('shortlist' , $.cookie('shortlist') +"^" + title);
}
else
{
$.cookie('shortlist', title );
}
return;
}


Please Check my answer if you help....
Thank You...

Lalit.


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend