473,414 Members | 1,636 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Problem - JS file

Hi,

I would like to ask for you help.

I have a page that contains few JS files (please see below).

The problem is that sometimes one of the files is not loaded (I am
using IE 5.5).

I get a run time error about object that is defined in
"MeridianView.js";
<LINK REL="stylesheet" TYPE="text/css" HREF="../style.css">
<SCRIPT language=JavaScript
src="../JavaScript/MeridianView.js"></SCRIPT>
<SCRIPT language=JavaScript src="../JavaScript/siteMenu.js"></SCRIPT>
<SCRIPT language=JavaScript src="../JavaScript/table.js"></SCRIPT>
<SCRIPT language=JavaScript src="../JavaScript/cookies.js"></SCRIPT>
style.css size is 21k
MeridianView.js size is 29k
siteMenu.js size is 9k
table.js size is 21k
cookies.js size is 5k

My page (asp file) size is 4k

Did you heard about such problem before?

Is my page (including the files) is too big?
How can I prevent it?

Do you think that moving to use persistent connection (can be used in
HTTP/1.1) will be helpful?

Thanks,

Yaron

Jul 20 '05 #1
4 3268
I personally would always reference the JS file with a absolute url rather
than a relative, stopping mistakes of having the file in the worng location.
This may not be your problem if it is sometimes loading but worth mentioning
I think.

Stu

"Yaron Cohen" <ya****@lyciumnetworks.com> wrote in message
news:9k********************************@4ax.com...
Hi,

I would like to ask for you help.

I have a page that contains few JS files (please see below).

The problem is that sometimes one of the files is not loaded (I am
using IE 5.5).

I get a run time error about object that is defined in
"MeridianView.js";
<LINK REL="stylesheet" TYPE="text/css" HREF="../style.css">
<SCRIPT language=JavaScript
src="../JavaScript/MeridianView.js"></SCRIPT>
<SCRIPT language=JavaScript src="../JavaScript/siteMenu.js"></SCRIPT>
<SCRIPT language=JavaScript src="../JavaScript/table.js"></SCRIPT>
<SCRIPT language=JavaScript src="../JavaScript/cookies.js"></SCRIPT>
style.css size is 21k
MeridianView.js size is 29k
siteMenu.js size is 9k
table.js size is 21k
cookies.js size is 5k

My page (asp file) size is 4k

Did you heard about such problem before?

Is my page (including the files) is too big?
How can I prevent it?

Do you think that moving to use persistent connection (can be used in
HTTP/1.1) will be helpful?

Thanks,

Yaron

Jul 20 '05 #2
"Stuart Palmer" wrote on 12/11/2003:
I personally would always reference the JS file with a absolute url rather than a relative, stopping mistakes of having the file in the worng location. This may not be your problem if it is sometimes loading but worth mentioning I think.
I would instead recommend specifying the base URL explicitly with the
BASE element. It makes it clear what URLs are relative to, without
being as verbose as using the entire address.

Mike

--
Michael Winter
M.Winter@[no-spam]blueyonder.co.uk (remove [no-spam] to reply)
Stu

"Yaron Cohen" <ya****@lyciumnetworks.com> wrote in message
news:9k********************************@4ax.com...
Hi,

I would like to ask for you help.

I have a page that contains few JS files (please see below).

The problem is that sometimes one of the files is not loaded (I am
using IE 5.5).

I get a run time error about object that is defined in
"MeridianView.js";
<LINK REL="stylesheet" TYPE="text/css" HREF="../style.css">
<SCRIPT language=JavaScript
src="../JavaScript/MeridianView.js"></SCRIPT>
<SCRIPT language=JavaScript src="../JavaScript/siteMenu.js"></SCRIPT> <SCRIPT language=JavaScript src="../JavaScript/table.js"></SCRIPT>
<SCRIPT language=JavaScript src="../JavaScript/cookies.js"></SCRIPT>

style.css size is 21k
MeridianView.js size is 29k
siteMenu.js size is 9k
table.js size is 21k
cookies.js size is 5k

My page (asp file) size is 4k

Did you heard about such problem before?

Is my page (including the files) is too big?
How can I prevent it?

Do you think that moving to use persistent connection (can be used in HTTP/1.1) will be helpful?

Thanks,

Yaron


Jul 20 '05 #3
Stuart Palmer wrote:
I personally would always reference the JS file with a absolute url rather
than a relative, stopping mistakes of having the file in the worng location.
I would not since this increases efforts required for local
testing or simply moving a site to another location.

When the document is downloaded from a HTTP server, the Mozilla JavaScript
console shows a script error in the case a 404 page has been defined and
the script file cannot be found. I found that very useful to track down
undeclared functions.
[Top posting]
Please stop wasting bandwidth and disk space:
http://www.netmeister.org/news/learn2quote.html
"Yaron Cohen" <ya****@lyciumnetworks.com> wrote
[...]
<SCRIPT language=JavaScript
src="../JavaScript/MeridianView.js"></SCRIPT>
<SCRIPT language=JavaScript src="../JavaScript/siteMenu.js"></SCRIPT>
<SCRIPT language=JavaScript src="../JavaScript/table.js"></SCRIPT>
<SCRIPT language=JavaScript src="../JavaScript/cookies.js"></SCRIPT>
The OP should try

<script
src="../JavaScript/MeridianView.js"
type="text/javascript"
</script>

<script src="../JavaScript/siteMenu.js" type="text/javascript"></script>
<script src="../JavaScript/table.js" type="text/javascript"></script>
<script src="../JavaScript/cookies.js" type="text/javascript"></script>

instead.
style.css size is 21k
MeridianView.js size is 29k
siteMenu.js size is 9k
table.js size is 21k
cookies.js size is 5k

My page (asp file) size is 4k
Now sum it up and think about a low-bandwidth (say a 56k analog modem) user
that has JavaScript supported and enabled. Is the additional functionality
really worth to wait this long?
Did you heard about such problem before?
Yes, see above.
Is my page (including the files) is too big?
The Magic Eight Ball says: Unlikely.
How can I prevent it?
Check for the location of your files (use the location bar),
and optimize the scripts where possible. If you used that
scripts unreflected, you better discard them, learn JavaScript
and the DOMs your are targeting and write it for yourselves.
Do you think that moving to use persistent connection (can be used in
HTTP/1.1) will be helpful?


No. It is a location or script issue, not a connection issue.
PointedEars
Jul 20 '05 #4
Michael Winter <M.Winter@[no-spam]blueyonder.co.uk> wrote:
^^^^^^^^^
"Stuart Palmer" wrote on 12/11/2003:
I personally would always reference the JS file with a absolute url rather
than a relative, stopping mistakes of having the file in the worng

location.
This may not be your problem if it is sometimes loading but worth

mentioning
I think.


Please repair your newsreader:
http://home.in.tum.de/~jain/software/oe-quotefix/

And use a valid e-mail address, according to the standards:
http://www.interhack.net/pubs/munging-harmful/
I would instead recommend specifying the base URL explicitly with the
BASE element. It makes it clear what URLs are relative to, without
being as verbose as using the entire address.


As said before, using the `href' attribute of the `base' element
increases maintenance effort. Thus I would not recommend it.
PointedEars
Jul 20 '05 #5

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

Similar topics

7
by: Keith Dewell | last post by:
Greetings! My current job has brought me back to working in C++ which I haven't used since school days. The solution to my problem may be trivial but I have struggled with it for the last two...
12
by: SJD | last post by:
I've just read Christoph Schittko's article on XmlSerializer: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxmlnet/html/trblshtxsd.asp . . . and very informative it is too....
15
by: Ken Allen | last post by:
I have been developing a suite of assemblies over the past couple of weeks, and this afternoon somethign started misbehaving. If I do not run the IDE and compiler the code from the command line,...
0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
5
by: IkBenHet | last post by:
Hello, I use this script to upload image files to a folder on a IIS6 server: ******************* START UPLOAD.ASPX FILE ********************** <%@ Page Language="VB" Debug="true" %>
8
by: Sarah | last post by:
I need to access some data on a server. I can access it directly using UNC (i.e. \\ComputerName\ShareName\Path\FileName) or using a mapped network drive resource (S:\Path\FileName). Here is my...
13
by: Lee Newson | last post by:
Hi, I have just written my first application using VB.NET. The app works fine when i am running it within .NET for debugging purposes, however when i try to run the app from the .exe file that...
2
by: key9 | last post by:
Hi all on last post I confused on how to organize file of class, ok ,the problem solved : should include class define head on cpp file. but this time ,still link error: strange is I put the...
0
by: anide | last post by:
Hi all I’ve some problem, I’m trying to converting a sorting algorithm from C++ to C#. In C++ I’ve compiled it using MSVC and its working properly, and in C# I’m using .NET Framework 2.0 (Visual...
4
by: Salad | last post by:
I have a situation where some, not all, users get the message "Couldn't find file "F:\AccessApps\AppName.mdw". This file is required for startup". My app the users are attempting to access is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...

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.