Help : Problem in JavaScript

G

Guest

You cannot access Session through client-side java script code. Session
variables iare in server memery. How to you expect to access then in
client-side machine?

HTH

Elton W
 
N

noor

Hi,
I'm trying to access Session through java script but its result is
negetive.
Kindly guid my how can i access session using javascript. plus after
accessing it I need to check if that session veriable let suppose
(session("FLAG")) contain "ok" then it will change the "class" of a html
link.
Kindly give a script i'll be thank full to U.
regards
Noor
 
G

Guest

If you want to do communication with session variable then use html hidden
variable that will initialize when page is loaded. Access it through
javascript like document.form1.varName.
Manepulate it as you want and post the page.
On server will receive hidden variable then you access it on server and do
set back to session.

B
 
I

intrader

Hi,
I'm trying to access Session through java script but its result is
negetive.
Kindly guid my how can i access session using javascript. plus after
accessing it I need to check if that session veriable let suppose
(session("FLAG")) contain "ok" then it will change the "class" of a html
link.
Kindly give a script i'll be thank full to U.
regards
Noor
Some simple inline asp coding as follows (assuming VB.NET):

var myFlagFromSession = "<%=Session("FLAG")%>";

Then in you can test the flag to change the link.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top