Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

variable access

Status
Not open for further replies.

jl8789

MIS
May 22, 2003
293
US
How do i make the (3) vars readable to the downstreamWtxs.js inside one <script> </script> scope?

<SCRIPT language=JAVASCRIPT type="text/javascript"> var WHATADAPTER="BASIC"; var vTXTYPE="N"; var vTXACT="A"; </SCRIPT>

<SCRIPT language=JAVASCRIPT type="text/javascript" SRC="/App/downstreamWtxs.js"></SCRIPT>

THANKS!
 
jl8789, that should work. Is it not working for you?

Do you have a link to the page where it is not working?

-kaht

Looking for a puppy? [small](Silky Terriers are hypoallergenic dogs that make great indoor pets due to their lack of shedding and small size)[/small]
 
Well since you are importing that JS file "downstreamWtxs.js", that is automatically one set of script tags. The ONLY way to keep one set of <script> tags in an HTML document AND import an external JS file is by placing all the script in the external JS file.

Otherwise you HAVE to have another set of <script> tags.

<.

 
inside one <script> </script> scope?

I missed that part. monksnake is correct, you would have to add the 3 variables to the js file. If you are populating the data for those variables from the server (via asp or whatever) then they will have to stay in the source code for the page like it is now - server side languages cannot define values in .js files.

-kaht

Looking for a puppy? [small](Silky Terriers are hypoallergenic dogs that make great indoor pets due to their lack of shedding and small size)[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top