#ifndef

L

learner

Hi,

Is there anyth like #ifndef variable in javascript?

I want to declare a varibale in a global file.

This file is included in all links.

I want to keep the variable value visible across links by using
#ifndef
then define variable
#endif in other links.

Is it possible?
 
E

Evertjan.

learner wrote on 30 aug 2004 in comp.lang.javascript:
Is there anyth like #ifndef variable in javascript?

I want to declare a varibale in a global file.

This file is included in all links.

I want to keep the variable value visible across links by using
#ifndef
then define variable
#endif in other links.

[#If we are talking about javascript in hhtml-files]

Including a javascript file in many pages does not make it a "global file".

Variables can be kept:
- serverside [ASP session variables or database with login]
- by posting them to the next page with serverside detection
- Clientside in cookies
- Clientside by sending them to the next link by querystring
[- Any guru knows more ways?]

[#EndIf]
 

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

Forum statistics

Threads
474,263
Messages
2,571,064
Members
48,769
Latest member
Clifft

Latest Threads

Top