473,513 Members | 2,533 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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>

Jul 28 '05 #1
23 16105
VK
> <SCRIPT LANGUAGE="JavaScript" SRC="../inc/JSfile.js"><SCRIPT*>

The closing tag: </SCRIPT>

Jul 28 '05 #2
My fault I haven't pasted that from file. In the file it's ok!

So try again:) please!

Jul 28 '05 #3


Loony wrote:
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?
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 28 '05 #4
VK


Loony wrote:
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?

Jul 28 '05 #5
On Thursday 28 July 2005 16:51, Loony(lo*****@op.pl) wrote in message
<11**********************@z14g2000cwz.googlegroups .com>
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>
Jul 28 '05 #6
> 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?

Jul 28 '05 #7
>Firefox does not allow relative path:
Try fully qualified path

Whar do you mean exactly?

Jul 28 '05 #8
In article <11*********************@o13g2000cwo.googlegroups. com>,
sc**********@yahoo.com says...


Loony wrote:
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


You can rule that one out right now.

--
Hywel

Kill the Crazy Frog
http://www.petitiononline.com/crzyfrg/
Jul 28 '05 #9


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.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 28 '05 #10
>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!

Jul 28 '05 #11
Loony wrote:
Post a URL where the problem occurs.

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.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Jul 28 '05 #12
>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.

Jul 28 '05 #13
Loony wrote:
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.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 28 '05 #14
No I haven't, my JSfile of javascripts looks like that

function Name_1()
{
}

function Name_2()
{
}
....

Jul 28 '05 #15
>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

Jul 29 '05 #16
Loony wrote:
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>


Then your js file should be at:
http://xxx.xx.xx.xx/inc/validation.js

Type that into your browser and see if it comes up.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Jul 29 '05 #17
>Then your js file should be at:
http://xxx.xx.xx.xx/inc/valida tion.js Type that into your browser and see if it comes up.


My files comes up at http://xxx.xx.xx.xx/e-shop/inc/valida tion.js

So what path to the file should I type in my ASP file in tag <SCRIPT
SRC="...">

Aug 1 '05 #18
Loony said the following on 8/1/2005 3:16 AM:
Then your js file should be at:
http://xxx.xx.xx.xx/inc/valida tion.js


Type that into your browser and see if it comes up.

My files comes up at http://xxx.xx.xx.xx/e-shop/inc/valida tion.js

So what path to the file should I type in my ASP file in tag <SCRIPT
SRC="...">


http://xxx.xx.xx.xx/e-shop/inc/validation.js
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Aug 1 '05 #19
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!

Aug 1 '05 #20
Loony wrote:
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!

this script tag is in the head of the document right? just to be clear
in your original code you didnt put </head> but im not sure if that was
a mistake in posting or not
Aug 1 '05 #21
>this script tag is in the head of the document right? just to be clear
in your original code you didnt put </head> but im not sure if that was
a mistake in posting or not


It's a mistake in posting. In the file it's ok!

Aug 1 '05 #22
Ok, I'm going to try here.
with all the "overtrimming" much of the 'discussion' is lost in previous
posts, so forgive me if I pull in text from older posts in this thread.

Loony wrote in message news:11**********************@z14g2000cwz.googlegr oups.com...
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> --> ^ type="text/javascript" ^ relative path? ^ </script> <SCRIPT>
<!--
other javascript scripts working propely
//-->
</SCRIPT> --> </head> <BODY>
...
</BODY>
</HTML> in the above there are a few things to consider:
1. according to XHTML 'standards' <TAGS> and its attributes should be <lowercase>
2. language is deprecated, type=text/javascript should be used instead
3. close your <tags> with </tags> (</script> and </head>)
4. make sure that relative paths are valid and the file is there.

to 3. you mentioned that it was ok in your original.
now, to continue

Loony wrote in message news:11*********************@g49g2000cwa.googlegro ups.com: Matt Kruse wrote in message news:dc********@news1.newsguy.com:
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>

^ language attribute is deprecated
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
ok, so /e-shop is a virtual folder?
IOW, you either access src="../inc/validation.js" as
<ip>/e-shop/inc/validation.js
or
<ip>/inc/validation.js

Loony wrote in message news:11**********************@o13g2000cwo.googlegr oups.com... 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!


now from http://xxx.xx.xx.xx/e-shop/new_contract.asp
"../inc/validation.js" resolves to
http://xxx.xx.xx.xx/e-shop/../inc/validation.js
^^^^^^^^^
../ removes e-shop/8
http://xxx.xx.xx.xx/inc/validation.js
so this is where your file should be, but as I understand, it is on
http://xxx.xx.xx.xx/e-shop/inc/validation.js
then the line should read:
<script type="text/javascript" src="inc/validation.js"></script>

without the ../ and no preceding / before inc/validation.js

HTH

Robi
Aug 1 '05 #23
Solved!

The path to the file was OK! and the </tags> were put right in the
file.
The problem was an order of function declarations in javascript file.
I have made a new javascript file with new order of declarations using
the order of not defined functions shown by JavaScript console.
Now everything works right! Thanks for help!

Aug 1 '05 #24

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
13374
by: David D. | last post by:
Does the file extension matter when including a JavaScript file in an HTML page? Normally, one would include a JavaScript file in an HTML page using <script src="foo.JS" type="text/javascript"> However, I have found that I can use an alternate file extension, such as <script src="foo.HTML" type="text/javascript"> It works fine with my...
6
7277
by: rob | last post by:
Hi I'm trying to create a "roll-up" effect when a window loses focus and then "roll-down" when it regains focus. This statement works properly with every browser I can get my hands on EXCEPT WinIE6. WinIE6 says there's an error in the code, but the debugging info says the problem is on line 1 char 1, which are comments. <Body...
10
3373
by: Blue® | last post by:
I would like to call the content of content.htm (containing only HTML codes) into index.htm. This is usually done by renaming index.htm to index.shtml and use this tag: <!--#include file="content.htm" --> But I do not want to use SSI. Is it possible to call it using something like:
4
14431
by: stevong | last post by:
It works on Konquerer though. I remember it works on IE too. I've tried window.close() too. Doesn't work on Firefox also. I've also tried to create a function. It doesnt work on Firefox also. Bottomline is: Firefox doesn't accept window.close() or self.close()? Are there ways to rectify the issue? Please advise.
1
6159
by: tilt | last post by:
Hello, I use an object element to replace the iframe element in ie, like this: <object id="x_obj" data="http://.../" type="text/html"> <iframe name="x_if" id="x_if" src="http://.../">
3
7804
by: joe | last post by:
Is it OK to have multiple: <script type="text/javascript" src="funcs1.js"></script> <script type="text/javascript" src="funcs2.js"></script> <script type="text/javascript" src="funcs3.js"></script> ? And I need to use similarly multiple CSS:
0
7270
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7178
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7565
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
5704
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4759
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3255
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
1612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
817
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
473
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.