By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,698 Members | 1,658 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,698 IT Pros & Developers. It's quick & easy.

#ifndef

P: n/a
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?

Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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)

Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.