Gossamer Forum
Home : Products : Gossamer Links : Discussions :

include javascript,..

Quote Reply
include javascript,..
hello,

i insert into the templates something like this:

<script language="JavaScript" src="../java-script/standard.js" type="text/javascript">


<script language="JavaScript" src="../java-script/standard.js" type="text/javascript">


this include java-script on teh runtime but if this code is included the pages dosent work. Can someone esplain this ?

Quote Reply
Re: include javascript,.. In reply to
../ is a relative path, since your pages end up in different directories (each sub-category goes another level down) you should use absolute path http://yourdomain.com/java-script/standard.js

Quote Reply
Re: include javascript,.. In reply to
hm but i dont think this is the problem my page is blank

Quote Reply
Re: include javascript,.. In reply to
As Mishpat says try the full path - you have nothing to lose - only a page to gain Smile

Paul Wilson.
Installations:
http://www.wiredon.net/gt/
Quote Reply
Re: include javascript,.. In reply to
hm irgendwie klappt das alles nicht . enwteder tauchen fehelr auf , es wird nix gefunden oder irgendwas anderes . hat jemand mal eien probeseite in der eine externe javasriptdatei eingebunden ist die nicht im hauptpfad liegt ?

Quote Reply
Re: include javascript,.. In reply to
Also, the type attribute is extraneous...meaning that it is not necessary to use...

Also, you need to CLOSE the script anchor with </script>.

Thus the complete codes should look like the following:

Code:

<script language="JavaScript1.2" src="/java-script/standard.js"></script>


BTW: This is probably a better question for the Perl/CGI Forum since it is more a general HTML coding question than with LINKS SQL...

Regards,

Eliot Lee