Hi,
This may seem like a client side problem but....
I have web pages that are made up of a number of javascript include files as
well as 'in page' script. They all work fine running locally until I hosted
them on our IIS server. Then the pages refuse to see nested javascript
calls.
e.g.
Main page contains JS code to call a function to one of the include files (-
no probs), which in turn wants to call a function in one of the other JS
include files but falls over with 'object expected' error in the line of
that call - I assume because it can't fine the function.
I think it may be something to do with processing order but as these files
are almost identical to another site that I created (certainly the JS
include files are and that worked 100%), I'm a bit lost. Any help would be
greatly appreciated.
Martin 25 1962
The problem may be caused because the browser has managed to download all
included the .js files yet. Instead, it is attempting to call a function in
a file that it doesn't have yet, generating an error.
Cheers
Ken
"Martin Walke" <ma**********@spamvega.co.uk> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
: Hi,
:
: This may seem like a client side problem but....
:
: I have web pages that are made up of a number of javascript include files
as
: well as 'in page' script. They all work fine running locally until I
hosted
: them on our IIS server. Then the pages refuse to see nested javascript
: calls.
:
: e.g.
:
: Main page contains JS code to call a function to one of the include files
(-
: no probs), which in turn wants to call a function in one of the other JS
: include files but falls over with 'object expected' error in the line of
: that call - I assume because it can't fine the function.
:
: I think it may be something to do with processing order but as these files
: are almost identical to another site that I created (certainly the JS
: include files are and that worked 100%), I'm a bit lost. Any help would be
: greatly appreciated.
:
: Martin
:
:
:
Object expected implies that the reference you used is either correct and
the object doesn't exist (script may have failed to load) or that the
reference is incorrect (eg. case sensitivity).
Try putting an alert into the script onload event to see if this pops up
before an alert at the point at which you call the function. You can also
use the DOM to check the script load status if you give the script an id
that you can refer to.
Make sure you .js files are referenced in the HEAD section of the html - the
page body shouldn't load until all elements of this section have loaded
*unless* you specify that a script can be loaded asynchronously.
Chris.
"Martin Walke" <ma**********@spamvega.co.uk> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
Hi,
This may seem like a client side problem but....
I have web pages that are made up of a number of javascript include files as
well as 'in page' script. They all work fine running locally until I hosted
them on our IIS server. Then the pages refuse to see nested javascript
calls.
e.g.
Main page contains JS code to call a function to one of the include files (-
no probs), which in turn wants to call a function in one of the other JS
include files but falls over with 'object expected' error in the line of
that call - I assume because it can't fine the function.
I think it may be something to do with processing order but as these files
are almost identical to another site that I created (certainly the JS
include files are and that worked 100%), I'm a bit lost. Any help would be
greatly appreciated.
Martin
Chris Barber wrote on 17 feb 2004 in
microsoft.public.inetserver.asp.general: Make sure you .js files are referenced in the HEAD section of the html - the page body shouldn't load until all elements of this section have loaded *unless* you specify that a script can be loaded asynchronously.
Or you can ask serverside help.
replace:
<script type="text/javascript"
src ="/js/myjavascript.js">
</script>
with:
<script type="text/javascript">
<!--#include virtual ="/js/myjavascript.js"-->
</script>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
But that prevents the browser from caching the page since you are using
inline javascript.
The whole point of <script src="/somewhereElse/something.js"
type="text/javascript"> is to allow the browser to cache the .js files
reducing the apparent response time of the application.
Cheers
Ken
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
: Chris Barber wrote on 17 feb 2004 in
: microsoft.public.inetserver.asp.general:
:
: > Make sure you .js files are referenced in the HEAD section of the html
: > - the page body shouldn't load until all elements of this section have
: > loaded *unless* you specify that a script can be loaded
: > asynchronously.
: >
:
: Or you can ask serverside help.
:
: replace:
:
: <script type="text/javascript"
: src ="/js/myjavascript.js">
: </script>
:
:
: with:
:
: <script type="text/javascript">
: <!--#include virtual ="/js/myjavascript.js"-->
: </script>
:
:
: --
: Evertjan.
: The Netherlands.
: (Please change the x'es to dots in my emailaddress)
I am having the exact same problem. Brand New win2k install service pack 4 and patches.
The site works on all other servers, but on the new one the javascript includes are not functioning
I put alerts in the included files that never fire.
I tried the virtual includes and I am still getting the problem
Thank
----- Ken Schaefer wrote: ----
But that prevents the browser from caching the page since you are usin
inline javascript
The whole point of <script src="/somewhereElse/something.js
type="text/javascript"> is to allow the browser to cache the .js file
reducing the apparent response time of the application
Cheer
Ke
"Evertjan." <ex**************@interxnl.net> wrote in messag
news:Xn********************@194.109.133.29..
: Chris Barber wrote on 17 feb 2004 i
: microsoft.public.inetserver.asp.general
: > Make sure you .js files are referenced in the HEAD section of the htm
: > - the page body shouldn't load until all elements of this section hav
: > loaded *unless* you specify that a script can be loade
: > asynchronously
:
: Or you can ask serverside help
: replace
: <script type="text/javascript
: src ="/js/myjavascript.js"
: </script
: with
: <script type="text/javascript"
: <!--#include virtual ="/js/myjavascript.js"--
: </script
: --
: Evertjan
: The Netherlands
: (Please change the x'es to dots in my emailaddress
Ken Schaefer wrote on 17 feb 2004 in
microsoft.public.inetserver.asp.general: The whole point of <script src="/somewhereElse/something.js" type="text/javascript"> is to allow the browser to cache the .js files reducing the apparent response time of the application.
I don't think that is that important any more even with POTS bandwith.
A small jpeg is much bigger than the general .js file.
No, IMHO, the point is to make one .js file usable
in many different .html's.
And the serverside include is not possible
for many clientside only virtual servers.
And some people think it diminishes the visual exposure
to simpleminded view-sorcerers.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
More Info: When I do the virtual the alerts fire but the popup menu wont function
The application is a .net 1.0 app using user controls for the header.
I have tried if from IE and Safari and both work on all other machines except this one
Thank
=?Utf-8?B?TU1pdGNoZWxs?= wrote on 17 feb 2004 in
microsoft.public.inetserver.asp.general: More Info: When I do the virtual the alerts fire but the popup menu wont function. The application is a .net 1.0 app using user controls for the header.
So you are heavily OT here on this classical ASP NG.
Please see a dotnet group.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Thanks guys.
All my includes are in the head section, and the offending line is being
called from the page onLoad routine which I thought was only actioned once
the page HAD downloaded all its 'bits'. It doesn't do it when using PWS, so
at least I can carry on testing for the moment but it must be something it
the timing og page downloads.
I'll check out the DOM object to see how I can check the script loading -
any idea of the method?
In terms of sequence of events when the browser loads a page, is there some
info somewhere that explains it? I've browsed the web without much luck but
sometimes it's useful to know what keywords to look for ;-)!
Thanks again
Martin
"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... Object expected implies that the reference you used is either correct and the object doesn't exist (script may have failed to load) or that the reference is incorrect (eg. case sensitivity).
Try putting an alert into the script onload event to see if this pops up before an alert at the point at which you call the function. You can also use the DOM to check the script load status if you give the script an id that you can refer to.
Make sure you .js files are referenced in the HEAD section of the html -
the page body shouldn't load until all elements of this section have loaded *unless* you specify that a script can be loaded asynchronously.
Chris.
"Martin Walke" <ma**********@spamvega.co.uk> wrote in message news:%2******************@TK2MSFTNGP10.phx.gbl... Hi,
This may seem like a client side problem but....
I have web pages that are made up of a number of javascript include files
as well as 'in page' script. They all work fine running locally until I
hosted them on our IIS server. Then the pages refuse to see nested javascript calls.
e.g.
Main page contains JS code to call a function to one of the include files
(- no probs), which in turn wants to call a function in one of the other JS include files but falls over with 'object expected' error in the line of that call - I assume because it can't fine the function.
I think it may be something to do with processing order but as these files are almost identical to another site that I created (certainly the JS include files are and that worked 100%), I'm a bit lost. Any help would be greatly appreciated.
Martin
<<....is to allow the browser to cache the .js files>>
And for us, in this application, that is important.
Martin
"Ken Schaefer" <ke*******@THISadOpenStatic.com> wrote in message
news:uP**************@TK2MSFTNGP12.phx.gbl... But that prevents the browser from caching the page since you are using inline javascript.
The whole point of <script src="/somewhereElse/something.js" type="text/javascript"> is to allow the browser to cache the .js files reducing the apparent response time of the application.
Cheers Ken "Evertjan." <ex**************@interxnl.net> wrote in message news:Xn********************@194.109.133.29... : Chris Barber wrote on 17 feb 2004 in : microsoft.public.inetserver.asp.general: : : > Make sure you .js files are referenced in the HEAD section of the html : > - the page body shouldn't load until all elements of this section have : > loaded *unless* you specify that a script can be loaded : > asynchronously. : > : : Or you can ask serverside help. : : replace: : : <script type="text/javascript" : src ="/js/myjavascript.js"> : </script> : : : with: : : <script type="text/javascript"> : <!--#include virtual ="/js/myjavascript.js"--> : </script> : : : -- : Evertjan. : The Netherlands. : (Please change the x'es to dots in my emailaddress)
=?Utf-8?B?bW1pdGNoZWxs?= wrote on 17 feb 2004 in
microsoft.public.inetserver.asp.general: Isn't this the IIS General Newsgroup?
No.
I suppose that is:
<microsoft.public.inetserver.iis>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
mmitchell wrote: Isn't this the IIS General Newsgroup?
No. this is the inetserver.ASP.general group.
There are a whole bunch of newsgroups devoted to .Net questions. They all
have the word "dotnet" in their names. E.G.,
microsoft.public.dotnet.framework.aspnet
etc.
HTH,
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Use body_onload event - the page onload fires as soon as the page HTML has
loaded (irrespective of external dependencies).
Chris.
"Martin Walke" <ma**********@spamvega.co.uk> wrote in message
news:e5**************@TK2MSFTNGP10.phx.gbl...
Thanks guys.
All my includes are in the head section, and the offending line is being
called from the page onLoad routine which I thought was only actioned once
the page HAD downloaded all its 'bits'. It doesn't do it when using PWS, so
at least I can carry on testing for the moment but it must be something it
the timing og page downloads.
I'll check out the DOM object to see how I can check the script loading -
any idea of the method?
In terms of sequence of events when the browser loads a page, is there some
info somewhere that explains it? I've browsed the web without much luck but
sometimes it's useful to know what keywords to look for ;-)!
Thanks again
Martin
"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... Object expected implies that the reference you used is either correct and the object doesn't exist (script may have failed to load) or that the reference is incorrect (eg. case sensitivity).
Try putting an alert into the script onload event to see if this pops up before an alert at the point at which you call the function. You can also use the DOM to check the script load status if you give the script an id that you can refer to.
Make sure you .js files are referenced in the HEAD section of the html -
the page body shouldn't load until all elements of this section have loaded *unless* you specify that a script can be loaded asynchronously.
Chris.
"Martin Walke" <ma**********@spamvega.co.uk> wrote in message news:%2******************@TK2MSFTNGP10.phx.gbl... Hi,
This may seem like a client side problem but....
I have web pages that are made up of a number of javascript include files
as well as 'in page' script. They all work fine running locally until I
hosted them on our IIS server. Then the pages refuse to see nested javascript calls.
e.g.
Main page contains JS code to call a function to one of the include files
(- no probs), which in turn wants to call a function in one of the other JS include files but falls over with 'object expected' error in the line of that call - I assume because it can't fine the function.
I think it may be something to do with processing order but as these files are almost identical to another site that I created (certainly the JS include files are and that worked 100%), I'm a bit lost. Any help would be greatly appreciated.
Martin
and ...
what the heck is everyone else blithering on about trying to argue about
client side <script src=""></script> usage - it's one of the cornerstones of
HTML and I for one use it all the time since even a few small scripts can
amount to 5-10 seconds delay in page load when not cached. Server-side
includes belong in server-side code *not* client side HTML.
So ... Martin, keep with what you have - it is correct - it's obvious that
its only the calling convention and timing to your included script functions
that is awry. As a benchmark, I have one heavily interactive web app with 15
include files totally 200k of javascript between them and not once has a
body_onload call to one of the functions failed.
Chris.
"Martin Walke" <ma**********@spamvega.co.uk> wrote in message
news:e5**************@TK2MSFTNGP10.phx.gbl...
Thanks guys.
All my includes are in the head section, and the offending line is being
called from the page onLoad routine which I thought was only actioned once
the page HAD downloaded all its 'bits'. It doesn't do it when using PWS, so
at least I can carry on testing for the moment but it must be something it
the timing og page downloads.
I'll check out the DOM object to see how I can check the script loading -
any idea of the method?
In terms of sequence of events when the browser loads a page, is there some
info somewhere that explains it? I've browsed the web without much luck but
sometimes it's useful to know what keywords to look for ;-)!
Thanks again
Martin
"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... Object expected implies that the reference you used is either correct and the object doesn't exist (script may have failed to load) or that the reference is incorrect (eg. case sensitivity).
Try putting an alert into the script onload event to see if this pops up before an alert at the point at which you call the function. You can also use the DOM to check the script load status if you give the script an id that you can refer to.
Make sure you .js files are referenced in the HEAD section of the html -
the page body shouldn't load until all elements of this section have loaded *unless* you specify that a script can be loaded asynchronously.
Chris.
"Martin Walke" <ma**********@spamvega.co.uk> wrote in message news:%2******************@TK2MSFTNGP10.phx.gbl... Hi,
This may seem like a client side problem but....
I have web pages that are made up of a number of javascript include files
as well as 'in page' script. They all work fine running locally until I
hosted them on our IIS server. Then the pages refuse to see nested javascript calls.
e.g.
Main page contains JS code to call a function to one of the include files
(- no probs), which in turn wants to call a function in one of the other JS include files but falls over with 'object expected' error in the line of that call - I assume because it can't fine the function.
I think it may be something to do with processing order but as these files are almost identical to another site that I created (certainly the JS include files are and that worked 100%), I'm a bit lost. Any help would be greatly appreciated.
Martin
Aha! Thanks Chris.
Martin
"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:OH**************@tk2msftngp13.phx.gbl... Use body_onload event - the page onload fires as soon as the page HTML has loaded (irrespective of external dependencies).
Chris.
"Martin Walke" <ma**********@spamvega.co.uk> wrote in message news:e5**************@TK2MSFTNGP10.phx.gbl... Thanks guys.
All my includes are in the head section, and the offending line is being called from the page onLoad routine which I thought was only actioned once the page HAD downloaded all its 'bits'. It doesn't do it when using PWS,
so at least I can carry on testing for the moment but it must be something it the timing og page downloads.
I'll check out the DOM object to see how I can check the script loading - any idea of the method?
In terms of sequence of events when the browser loads a page, is there
some info somewhere that explains it? I've browsed the web without much luck
but sometimes it's useful to know what keywords to look for ;-)!
Thanks again Martin
"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... Object expected implies that the reference you used is either correct
and the object doesn't exist (script may have failed to load) or that the reference is incorrect (eg. case sensitivity).
Try putting an alert into the script onload event to see if this pops up before an alert at the point at which you call the function. You can
also use the DOM to check the script load status if you give the script an id that you can refer to.
Make sure you .js files are referenced in the HEAD section of the html - the page body shouldn't load until all elements of this section have loaded *unless* you specify that a script can be loaded asynchronously.
Chris.
"Martin Walke" <ma**********@spamvega.co.uk> wrote in message news:%2******************@TK2MSFTNGP10.phx.gbl... Hi,
This may seem like a client side problem but....
I have web pages that are made up of a number of javascript include
files as well as 'in page' script. They all work fine running locally until I hosted them on our IIS server. Then the pages refuse to see nested javascript calls.
e.g.
Main page contains JS code to call a function to one of the include
files (- no probs), which in turn wants to call a function in one of the other JS include files but falls over with 'object expected' error in the line of that call - I assume because it can't fine the function.
I think it may be something to do with processing order but as these
files are almost identical to another site that I created (certainly the JS include files are and that worked 100%), I'm a bit lost. Any help would
be greatly appreciated.
Martin
I got here by microsoft.public.inetserver.iis and found this from Martin's orignal post.
Probably didn't see it on PWS because the load times would have been quick
enough for the function to be available (caching helps as well).
Chris.
"Martin Walke" <ma**********@spamvega.co.uk> wrote in message
news:eB**************@TK2MSFTNGP09.phx.gbl...
Aha! Thanks Chris.
Martin
"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:OH**************@tk2msftngp13.phx.gbl... Use body_onload event - the page onload fires as soon as the page HTML has loaded (irrespective of external dependencies).
Chris.
"Martin Walke" <ma**********@spamvega.co.uk> wrote in message news:e5**************@TK2MSFTNGP10.phx.gbl... Thanks guys.
All my includes are in the head section, and the offending line is being called from the page onLoad routine which I thought was only actioned once the page HAD downloaded all its 'bits'. It doesn't do it when using PWS,
so at least I can carry on testing for the moment but it must be something it the timing og page downloads.
I'll check out the DOM object to see how I can check the script loading - any idea of the method?
In terms of sequence of events when the browser loads a page, is there
some info somewhere that explains it? I've browsed the web without much luck
but sometimes it's useful to know what keywords to look for ;-)!
Thanks again Martin
"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... Object expected implies that the reference you used is either correct
and the object doesn't exist (script may have failed to load) or that the reference is incorrect (eg. case sensitivity).
Try putting an alert into the script onload event to see if this pops up before an alert at the point at which you call the function. You can
also use the DOM to check the script load status if you give the script an id that you can refer to.
Make sure you .js files are referenced in the HEAD section of the html - the page body shouldn't load until all elements of this section have loaded *unless* you specify that a script can be loaded asynchronously.
Chris.
"Martin Walke" <ma**********@spamvega.co.uk> wrote in message news:%2******************@TK2MSFTNGP10.phx.gbl... Hi,
This may seem like a client side problem but....
I have web pages that are made up of a number of javascript include
files as well as 'in page' script. They all work fine running locally until I hosted them on our IIS server. Then the pages refuse to see nested javascript calls.
e.g.
Main page contains JS code to call a function to one of the include
files (- no probs), which in turn wants to call a function in one of the other JS include files but falls over with 'object expected' error in the line of that call - I assume because it can't fine the function.
I think it may be something to do with processing order but as these
files are almost identical to another site that I created (certainly the JS include files are and that worked 100%), I'm a bit lost. Any help would
be greatly appreciated.
Martin
MMitchell wrote: I got here by microsoft.public.inetserver.iis and found this from Martin's orignal post.
I'm not sure why you think that is relevant. You have a question about a
dotnet application. While you may be lucky enough to find somebody here who
can answer a question about a dotnet application, you can eliminate the luck
factor by posting to the dotnet newsgroups where the dotnet gurus can be
found.
Please do not interpret this as a reprimand: we are simply trying to help
you maximize your chances of getting a relevant reply.
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Its an IIS problem, not a .net problem
From browsing alot of the newsgroups, Thier is something going on
with server includes.
Thanks
I think we have our own sub-thread here whilst the main thread keeps growing
arguing about dotnet vs. classic.
hehe :)
Chris.
"Martin Walke" <ma**********@spamvega.co.uk> wrote in message
news:eB**************@TK2MSFTNGP09.phx.gbl...
Aha! Thanks Chris.
Martin
"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:OH**************@tk2msftngp13.phx.gbl... Use body_onload event - the page onload fires as soon as the page HTML has loaded (irrespective of external dependencies).
Chris.
"Martin Walke" <ma**********@spamvega.co.uk> wrote in message news:e5**************@TK2MSFTNGP10.phx.gbl... Thanks guys.
All my includes are in the head section, and the offending line is being called from the page onLoad routine which I thought was only actioned once the page HAD downloaded all its 'bits'. It doesn't do it when using PWS,
so at least I can carry on testing for the moment but it must be something it the timing og page downloads.
I'll check out the DOM object to see how I can check the script loading - any idea of the method?
In terms of sequence of events when the browser loads a page, is there
some info somewhere that explains it? I've browsed the web without much luck
but sometimes it's useful to know what keywords to look for ;-)!
Thanks again Martin
"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... Object expected implies that the reference you used is either correct
and the object doesn't exist (script may have failed to load) or that the reference is incorrect (eg. case sensitivity).
Try putting an alert into the script onload event to see if this pops up before an alert at the point at which you call the function. You can
also use the DOM to check the script load status if you give the script an id that you can refer to.
Make sure you .js files are referenced in the HEAD section of the html - the page body shouldn't load until all elements of this section have loaded *unless* you specify that a script can be loaded asynchronously.
Chris.
"Martin Walke" <ma**********@spamvega.co.uk> wrote in message news:%2******************@TK2MSFTNGP10.phx.gbl... Hi,
This may seem like a client side problem but....
I have web pages that are made up of a number of javascript include
files as well as 'in page' script. They all work fine running locally until I hosted them on our IIS server. Then the pages refuse to see nested javascript calls.
e.g.
Main page contains JS code to call a function to one of the include
files (- no probs), which in turn wants to call a function in one of the other JS include files but falls over with 'object expected' error in the line of that call - I assume because it can't fine the function.
I think it may be something to do with processing order but as these
files are almost identical to another site that I created (certainly the JS include files are and that worked 100%), I'm a bit lost. Any help would
be greatly appreciated.
Martin
Yep - I think we'll just let them get on with it. (Who wants dotnet
anyway?)!! ;-0
Martin
"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:e5**************@TK2MSFTNGP11.phx.gbl... I think we have our own sub-thread here whilst the main thread keeps
growing arguing about dotnet vs. classic.
hehe :)
Chris.
"Martin Walke" <ma**********@spamvega.co.uk> wrote in message news:eB**************@TK2MSFTNGP09.phx.gbl... Aha! Thanks Chris.
Martin
"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message news:OH**************@tk2msftngp13.phx.gbl... Use body_onload event - the page onload fires as soon as the page HTML
has loaded (irrespective of external dependencies).
Chris.
"Martin Walke" <ma**********@spamvega.co.uk> wrote in message news:e5**************@TK2MSFTNGP10.phx.gbl... Thanks guys.
All my includes are in the head section, and the offending line is being called from the page onLoad routine which I thought was only actioned
once the page HAD downloaded all its 'bits'. It doesn't do it when using PWS, so at least I can carry on testing for the moment but it must be something
it the timing og page downloads.
I'll check out the DOM object to see how I can check the script
loading - any idea of the method?
In terms of sequence of events when the browser loads a page, is there some info somewhere that explains it? I've browsed the web without much luck but sometimes it's useful to know what keywords to look for ;-)!
Thanks again Martin
"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... Object expected implies that the reference you used is either correct and the object doesn't exist (script may have failed to load) or that the reference is incorrect (eg. case sensitivity).
Try putting an alert into the script onload event to see if this pops
up before an alert at the point at which you call the function. You can also use the DOM to check the script load status if you give the script an
id that you can refer to.
Make sure you .js files are referenced in the HEAD section of the
html - the page body shouldn't load until all elements of this section have
loaded *unless* you specify that a script can be loaded asynchronously.
Chris.
"Martin Walke" <ma**********@spamvega.co.uk> wrote in message news:%2******************@TK2MSFTNGP10.phx.gbl... Hi,
This may seem like a client side problem but....
I have web pages that are made up of a number of javascript include files as well as 'in page' script. They all work fine running locally until I hosted them on our IIS server. Then the pages refuse to see nested javascript calls.
e.g.
Main page contains JS code to call a function to one of the include files (- no probs), which in turn wants to call a function in one of the other
JS include files but falls over with 'object expected' error in the line
of that call - I assume because it can't fine the function.
I think it may be something to do with processing order but as these files are almost identical to another site that I created (certainly the JS include files are and that worked 100%), I'm a bit lost. Any help
would be greatly appreciated.
Martin
That was my own feeling - I needed to have the files cached where I could as
the client will only allow 30k pages including includes, graphics etc. I
think that body_onload call will hopefully sort things out for me - if not I
can revisit the thread at a later date.
Thanks again
Martin
"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... and ...
what the heck is everyone else blithering on about trying to argue about client side <script src=""></script> usage - it's one of the cornerstones
of HTML and I for one use it all the time since even a few small scripts can amount to 5-10 seconds delay in page load when not cached. Server-side includes belong in server-side code *not* client side HTML.
So ... Martin, keep with what you have - it is correct - it's obvious that its only the calling convention and timing to your included script
functions that is awry. As a benchmark, I have one heavily interactive web app with
15 include files totally 200k of javascript between them and not once has a body_onload call to one of the functions failed.
Chris.
"Martin Walke" <ma**********@spamvega.co.uk> wrote in message news:e5**************@TK2MSFTNGP10.phx.gbl... Thanks guys.
All my includes are in the head section, and the offending line is being called from the page onLoad routine which I thought was only actioned once the page HAD downloaded all its 'bits'. It doesn't do it when using PWS,
so at least I can carry on testing for the moment but it must be something it the timing og page downloads.
I'll check out the DOM object to see how I can check the script loading - any idea of the method?
In terms of sequence of events when the browser loads a page, is there
some info somewhere that explains it? I've browsed the web without much luck
but sometimes it's useful to know what keywords to look for ;-)!
Thanks again Martin
"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... Object expected implies that the reference you used is either correct
and the object doesn't exist (script may have failed to load) or that the reference is incorrect (eg. case sensitivity).
Try putting an alert into the script onload event to see if this pops up before an alert at the point at which you call the function. You can
also use the DOM to check the script load status if you give the script an id that you can refer to.
Make sure you .js files are referenced in the HEAD section of the html - the page body shouldn't load until all elements of this section have loaded *unless* you specify that a script can be loaded asynchronously.
Chris.
"Martin Walke" <ma**********@spamvega.co.uk> wrote in message news:%2******************@TK2MSFTNGP10.phx.gbl... Hi,
This may seem like a client side problem but....
I have web pages that are made up of a number of javascript include
files as well as 'in page' script. They all work fine running locally until I hosted them on our IIS server. Then the pages refuse to see nested javascript calls.
e.g.
Main page contains JS code to call a function to one of the include
files (- no probs), which in turn wants to call a function in one of the other JS include files but falls over with 'object expected' error in the line of that call - I assume because it can't fine the function.
I think it may be something to do with processing order but as these
files are almost identical to another site that I created (certainly the JS include files are and that worked 100%), I'm a bit lost. Any help would
be greatly appreciated.
Martin
Just an FYI. I rebuilt the server for a 3rd time in 2 days and didn't install IE6 sp1 and the problem is gone.
MMItchell wrote: Just an FYI. I rebuilt the server for a 3rd time in 2 days and didn't install IE6 sp1 and the problem is gone.
That means you did not get some major security updates ...
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Possibilities:
a) have an intro page for your site that caches the files, have this load
before any of the application pages that require the files
b) have some code in one of the included files that calls the functions (or
use the DOM to change the onLoad to call a function), rather than having the
main html page call the functions.
Cheers
Ken
"Martin Walke" <ma**********@spamvega.co.uk> wrote in message
news:OC**************@TK2MSFTNGP09.phx.gbl...
: <<....is to allow the browser to cache the .js files>>
: And for us, in this application, that is important.
:
: Martin
:
: "Ken Schaefer" <ke*******@THISadOpenStatic.com> wrote in message
: news:uP**************@TK2MSFTNGP12.phx.gbl...
: > But that prevents the browser from caching the page since you are using
: > inline javascript.
: >
: > The whole point of <script src="/somewhereElse/something.js"
: > type="text/javascript"> is to allow the browser to cache the .js files
: > reducing the apparent response time of the application.
: >
: > Cheers
: > Ken
: >
: >
: >
: > "Evertjan." <ex**************@interxnl.net> wrote in message
: > news:Xn********************@194.109.133.29...
: > : Chris Barber wrote on 17 feb 2004 in
: > : microsoft.public.inetserver.asp.general:
: > :
: > : > Make sure you .js files are referenced in the HEAD section of the
html
: > : > - the page body shouldn't load until all elements of this section
have
: > : > loaded *unless* you specify that a script can be loaded
: > : > asynchronously.
: > : >
: > :
: > : Or you can ask serverside help.
: > :
: > : replace:
: > :
: > : <script type="text/javascript"
: > : src ="/js/myjavascript.js">
: > : </script>
: > :
: > :
: > : with:
: > :
: > : <script type="text/javascript">
: > : <!--#include virtual ="/js/myjavascript.js"-->
: > : </script>
: > :
: > :
: > : --
: > : Evertjan.
: > : The Netherlands.
: > : (Please change the x'es to dots in my emailaddress)
: >
: >
:
: This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dave Thomas |
last post by:
I have developed a web site using asp pages that use both vbscript and
javascript. Run the site on my PC and everything is fine. Ftp to my
web hosting provider which hosts asp pages and look on my...
|
by: Martin Walke |
last post by:
Hi guys,
For those who responded before here's an update from hell!!!
I think I confused people before when I said on the 'page load' and Chris
suggested using the body onload. I was using the...
|
by: relaxedrob |
last post by:
Howdy All!
I have just finished developing a menu template for easy use in an any
web page!
The example uses CSS and JavaScript.
The url is:...
|
by: McKirahan |
last post by:
Has anyone experienced this (and found a solution)?
I have five files: a .htm that invokes four .js include files.
Only the first alert in the first include is displayed.
This only happens...
|
by: =?Utf-8?B?SkhpbGJDUk0=?= |
last post by:
I am trying to write a httpmodule to inject javascript includes on some of
the aspx pages we have.
For instance, I want to inject into the resulting IIS response something
like...
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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...
|
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,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
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...
| |