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]
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)