Categories

CODE
Visual C++ Programming
C++ (Non Visual C++ Issues)
Modern Windows Apps (Metro)
C++ and WinAPI
Managed C++ and C++/CLI
Visual C++ Bugs & Fixes
Graphics Programming
Multithreading
Network Programming
Driver Development
Visual Basic 6.0 Programming
Visual Basic .NET
Crystal Reports
C-Sharp Programming
Managed C++
Visual Basic .NET
ASP.NET
.NET Framework
ADO.NET
Windows Presentation Foundation (WPF) & XAML forum
Silverlight
.NET Installation and Configuration Issues
Java Programming
AJAX
Scripting - Client Side
Database
XML
Wireless/Mobile Development
Assembly
Scripting - Server Side (PHP, Perl, etc.)
Python
General Developer Topics
Project Planning, Design, and Management
Testers and Testing
Algorithms & Data Structures
General Discussion / Chit Chat
Announcements, Press Releases, & News
Feedback
Articles Suggestions
Testing Area
Programming Projects
C# Game(s) Project
Game Engine Project
C++ Coding Project
Project: Code War
Slow Chat: Talk with Microsoft Developer Teams
Slow Chat: Developing Multithreaded Applications
Slow Chat: C++0x
Slow Chat: Visual C++: Yesterday, Today, and Tomorrow
Directory Services
General Windows and DNA Programming
Windows OS Issues
Open Positions (Jobs)
Looking for Work
Visual Basic .NET FAQs
Visual Basic FAQs
CodeGuru Individual FAQs
CodeGuru Individual Visual Basic FAQs

Resources

Java Database
Linux
Coding
Mobile
Hardware
Software Development
Software Development
iOS,OS X
iOS,OS X
ORACLE
IBM DEVELOPER
IBM DEVELOPER
MSDN
MSDN


Tags

Scripting - Client Side

Discuss client-side scripting issues. Client-side scripting such as JavaScript, JScript, and VBScript as well as technologies such as HTML and stylesheets.

saving variables between stages


a lot of times i have to save certain variables in ajax/javascript. What is the best practice way to save such variables....    right now i save them as hidden form fields and assign them an id and access them later... but im wondering if this is the right way to do it.    i do know another method of saving it is using cookies... if there are other i donot know... so plz fill in wat you think is the way to store variables for use by jquery/javascript    i know this is not exactly server side but it has ajax involved and i wasnt getting any response from the ajax forum so thought i would paste here.  				  			

  				  					Unless you want a server-side solution, I'm going to move this to client-side scripting.  As for your problem, client-side storage is very limited. As you've already mentioned, you have <input> and cookies. Other than that, you will have to go server-side. I'm going to already assume that the information your passing is not volatile. If it needs security...then ALWAYS use server-side storage methods.  So, with that in mind, as long as your information is not large, there's no reason why you shouldn't just use forms. If you're passing this across multiple pages, you will want to look into cookies. Or, to keep your HTML output to a minimum, sometimes you may want to use cookies as well.  				  			

  				  					  	  		  			  			  				  					 Originally Posted by PeejAvery  					  				  				Unless you want a server-side solution, I'm going to move this to client-side scripting.    As for your problem, client-side storage is very limited. As you've already mentioned, you have <input> and cookies. Other than that, you will have to go server-side. I'm going to already assume that the information your passing is not volatile. If it needs security...then ALWAYS use server-side storage methods.    So, with that in mind, as long as your information is not large, there's no reason why you shouldn't just use forms. If you're passing this across multiple pages, you will want to look into cookies. Or, to keep your HTML output to a minimum, sometimes you may want to use cookies as well.  			  		  	   perfect, makes sense.  				  			

  				  					[ moved thread ]


Related Links

Problem running VB DLL in Internet Explorer
zIndex scipt wont work
Calling PHP from Javascript
Javascript error
Very strange problem in firefox
text box content style with mouseover effect
Regarding javascript
images displayed on the search engine page
VBscript: Need some advice on how to parse HTML code and split them into parts
[RESOLVED] Register for .NET EventHandler
How do I turn this form button info into just a link
[RESOLVED] HtmlSelect onclick attribute
BIM generator
Feedback on JavaScript OOP model
Get the position of Window object
JS-generated text boxes is not sent on submit!