Moderators: Derry, Goldie, Harpo
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Honorary Mechanic
Picture of podge
Posted
When i try to use .js files in my project (with the .js extension and nothing else on the page) i get a syntax error. Everything works ok if i link to external .js files, is this a problem with webengine or am i doing something wrong?


A part of JD&Co web design
-------------------------------------------------
"It's not where you take things from - It's where you take them to" -Jean-Luc Godard
 
Posts: 837 | Location: England | Registered: March 13, 2005Reply With QuoteEdit or Delete MessageReport This Post
Guru 'Power' Mechanic
Picture of Bruceee
Posted Hide Post
To use a Javascript file as an include file, you need to place a code object on your workpage like this:
<SCRIPT LANGUAGE=JAVASCRIPT SRC="MyJSFile.js"></SCRIPT>
This is probably the version you have working.

The only other way I know of is to paste the code into your workpage as one or more code objects. But your problem method:
quote:
When i try to use .js files in my project (with the .js extension and nothing else on the page)...

seems to be something else.

That is likely the source of your problem. But I am curious -- how are you trying to do that? It is possible that there is a third method that also should work -- if so please do tell Smile
 
Posts: 9269 | Location: Wellington, New Zealand | Registered: December 11, 2003Reply With QuoteEdit or Delete MessageReport This Post
Honorary Mechanic
Picture of podge
Posted Hide Post
Ok... i'll try that.
I have tried inserting the code as a code object and changing the extension to .js and i get a syntax error.
If i import using foreign object editor i get "your need to install the required plugins"
and then with firefox i click install plugin and get
"plugin could not be found, click here to download plugins manually"

i'll try it your way Smile


A part of JD&Co web design
-------------------------------------------------
"It's not where you take things from - It's where you take them to" -Jean-Luc Godard
 
Posts: 837 | Location: England | Registered: March 13, 2005Reply With QuoteEdit or Delete MessageReport This Post
  Powered by Eve Community  
 


™ & © 1998 - 2008, Virtual Mechanics Inc. All rights reserved.