25, July 2008

Javascript global variables and includes - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  JavaScript
Topic: Javascript global variables and includes
« previous next »
Pages: [1] Print

Author Topic: Javascript global variables and includes  (Read 922 times)
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 7975
40807 credits
Members referred : 3



« on: Feb 27, 2007, 03:34:36 PM »

I have a problem with javascript and includes.

I use a code like :

Code:
<script type="text/javascript">
var a = 1;
</script>
<script type="text/javascript" src="a.js"></script>

The question is how can I refer to a from the a.js file?

Thanks in advance for any answers Smiley

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : MIA - Where Nick and Tim
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6280
38506 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Feb 27, 2007, 05:16:07 PM »

you want to use var a inside script a? (these are really clear names) Smiley


Last blog : 4th of July Lottery from TemplateMonster.com
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 7975
40807 credits
Members referred : 3



« Reply #2 on: Feb 27, 2007, 05:41:35 PM »

Yeah, and this way it will work.

I just made a typo Smiley

(how common way to eat your time....)

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : MIA - Where Nick and Tim
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6280
38506 credits
Members referred : 374


It's time to use PHP5!


« Reply #3 on: Feb 27, 2007, 05:44:53 PM »

Yeah, and this way it will work.

I just made a typo Smiley

(how common way to eat your time....)

hehe


Last blog : 4th of July Lottery from TemplateMonster.com
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=6125
Tags : javascript global variables include Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  JavaScript
Topic: Javascript global variables and includes
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Jul 25, 2008, 12:09:03 AM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 35.717
Total Topics: 7.379
Total Members: 3.711
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: Asimina

31 Guests, 5 Users online :

12 users online today:



Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.