Click to See Complete Forum and Search --> : external javascript again


olaf
01-14-2004, 03:16 AM
Hallo,

I know this is one of the most posted threads here, but in my case its special.

I use this code for calling some JS.

<script language="JavaScript" src="../js/nopcart.js"></script>
<script language="JavaScript" src="../js/standard_lang.js"></script>


It works goed if i use in a PHP file. If I use it in a HTML file it sucks.

Any idea?

Kor
01-14-2004, 03:39 AM
I don't see why, this is the correct syntax. Have u checked is the tree reference ../ is correct? I mean, is there a real tree way back and forth to that folder?

olaf
01-14-2004, 03:46 AM
That's right i found the problem inside the scripts. (they need some cookie info and i called them without one)

It's solved.

Kor
01-14-2004, 03:50 AM
errrrr... the external file name should not have special characters, like _...

olaf
01-14-2004, 03:53 PM
Hallo,
i saw that there are problems with the path in a cookie. It seems to be that i have to register the cookie on the lowest level, otherwise i t doesn't work.

Is there anothersolution?

soccer362001
01-14-2004, 04:00 PM
Originally posted by olaf
Hallo,

I know this is one of the most posted threads here, but in my case its special.

I use this code for calling some JS.

<script language="JavaScript" src="../js/nopcart.js"></script>
<script language="JavaScript" src="../js/standard_lang.js"></script>



First of all its <script type="text/javascript" src="../js/nopcart.js"></script>

Kor
01-15-2004, 02:27 AM
First of all its <script type="text/javascript" src="../js/nopcart.js"></script>


Well... some say that "language" is a deprecated attribute and is maybe a better ideea to use "type" instead. In fact, as far as I have noticed, if avoiding upper caps, each and both "language" or/and "type" will do the job properly... You may encounter some validation problems, but there will no real errors....

olaf
01-15-2004, 06:01 AM
I think the most clients are ie 5 or higher. That means the script-tag should be enough...