28, May 2012

Javascript global variables and includes - webmaster forum

 
Webdigity webmaster forums
[ 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
Instabuck - The easy way to sell digital products online

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



« on: Feb 27, 2007, 02: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 or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Feb 27, 2007, 04:16:07 pm »

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

I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #2 on: Feb 27, 2007, 04: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 or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #3 on: Feb 27, 2007, 04:44:53 pm »

Yeah, and this way it will work.

I just made a typo Smiley

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

hehe

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....

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?
May 28, 2012, 05:16:30 pm





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!






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