<SCRIPT SRC="../..."> doesn't work under Firefox.

L

Loony

I have got a code like this in HTML section in ASP file which includes
javascript file! The script works under MS IE but doesn't with Firefox!
Can anybody tell me what is wrong?

<HTML>
<HEAD><TITLE></TITLE>
<SCRIPT LANGUAGE="JavaScript" SRC="../inc/JSfile.js"><SCRIPT>
<SCRIPT>
<!--
other javascript scripts working propely
//-->
</SCRIPT>
<BODY>
....
</BODY>
</HTML>
 
V

VK

<SCRIPT LANGUAGE="JavaScript" SRC="../inc/JSfile.js"><SCRIPT­>

The closing tag: </SCRIPT>
 
M

Martin Honnen

Loony said:
My fault I haven't pasted that from file. In the file it's ok!

Post a URL where the problem occurs.
Why do you think that the file is not loaded, do you get script errors,
which ones exactly?
 
V

VK

Loony said:
My fault I haven't pasted that from file. In the file it's ok!

So try again:) please!

Just killed my Firefox again during a rude vivisection.

Possibilities:

1) Firefox does not allow relative path:
Try fully qualified path

2) You open the page from local drive so src doesn't point to the right
place.

3) Somehow the <base> tag got set in the header section.

Actually if the (1) doesn't help, then (2) and (3) are for sport only.
The real reason then in the script code itself. IE forgives much more
mistakes than FF and executes it, FF spit it out. What does JavaScript
console says?
 
P

PDannyD

On Thursday 28 July 2005 16:51, Loony([email protected]) wrote in message
I have got a code like this in HTML section in ASP file which includes
javascript file! The script works under MS IE but doesn't with Firefox!
Can anybody tell me what is wrong?

<HTML>
<HEAD><TITLE></TITLE>
<SCRIPT LANGUAGE="JavaScript" SRC="../inc/JSfile.js"><SCRIPT>

Shouldn't it be this instead?

<script type="text/javascript" src="../inc/JSfile.js"></script>
 
L

Loony

Why do you think that the file is not loaded, do you get script errors,
which ones exactly?

I get errros in JavaScript that for example function XXX() is not
defined!
If I paste the script into the file then it's ok, but if it's outside
the file, imprted from the url it doesn't work, so it's not the script
code itself.
You open the page from local drive so src doesn't point to the right
place.

No I don't I don't all files are placed on the local network server!
So the src must point to the right place!
Somehow the <base> tag got set in the header section.
What do you mean?
 
H

Hywel Jenkins

Just killed my Firefox again during a rude vivisection.

Possibilities:

1) Firefox does not allow relative path:
Try fully qualified path

You can rule that one out right now.
 
M

Martin Honnen

Loony wrote:

I get errros in JavaScript that for example function XXX() is not
defined!
If I paste the script into the file then it's ok, but if it's outside
the file, imprted from the url it doesn't work, so it's not the script
code itself.

Post a URL where the problem occurs.
 
L

Loony

Post a URL where the problem occurs.

I can't post the url, because it is not public ip.
The structure of the network is:
Server at ip:xxx.xxx.xx.xx on drive c so i can get to the source code!
My ASP file is in yyy/aaa folder and the JSfile.js is in the yyy/bbb
folder
so to point the file I type <script src="../bbb/Jsfile.js"></script>

On local drive it works, it dosent work on the server!
 
M

Matt Kruse

Loony said:
I can't post the url, because it is not public ip.

Post EXACTLY:
1) The url you see in your browser. Hide the IP if you wish.

2) The <script> tag used to access the JS file

From that, we can compute the URL to the JS file. Putting that in manually
should bring the JS file from the server. I suspect the file is not where
you think it is. That's usually the case in situations like this.
 
D

David Dorward

Loony said:
I have got a code like this in HTML section in ASP file which includes
javascript file! The script works under MS IE but doesn't with Firefox!
Can anybody tell me what is wrong?

Have you put SGML (HTML) comments in your Javascript? If so - Don't.
 
L

Loony

Post EXACTLY:
1) The url you see in your browser. Hide the IP if you wish.
2) The <script> tag used to access the JS file
OK I will do it tomorrow!
Sorry for my language, English isn't my native language.
 
L

Loony

No I haven't, my JSfile of javascripts looks like that

function Name_1()
{
}

function Name_2()
{
}
....
 
L

Loony

Post EXACTLY:
1) The url you see in your browser. Hide the IP if you wish.
http://xxx.xx.xx.xx/e-shop/new_contract.asp

2) The <script> tag used to access the JS file
<SCRIPT LANGUAGE ="JavaScript" TYPE="text/javascript"
SRC="../inc/validation.js"></SCRIPT>

The JS file is located on server xxx.xx.xx.xx\c\Inetpub\inc
My ASP file is located on server xxx.xx.xx.xx\c\Inetpub\new_contract
 
L

Loony

HELP!

My file comes up in the browser when I type
http://xxx.xx.xx.xx/e-shop/inc /validation.js under MS IE and Firefox.
The tag <SCRIPT LANGUAGE="JavaScript"
SRC="../inc/validation.js"></SCRIPT> includes the validation.js file
under MS IE, but JavaScript console in Firefox still says that
functions (from validation.js) are not defined.. I have pasted the
functions from validation.js
into the ASP file where I have put the tag <SCRIPT
LANGUAGE="JavaScript" SRC="../inc/validation.js"></SCRIPT> and then
everything works propely..but I don't want do that this way!
What should I do..it's really strange!

Please help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top