473,804 Members | 4,005 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Included function not always found.

I have a function on an "included" page.

For reasons unknown to me I frequently will get an error - to the effect
that the function can't be found.

If I hit refresh/F5 it loads the page just fine.

It doesn't happen often .. maybe once every 50 pages. It also doesn't
happen on any specific page.

I'd show code, but it's not really related to either the function or any
specific page.

Is there any sort of a delay between Asp loading the "includes" and
processing the rest of the page? I'm wondering if the function is getting
called before the include is pulled in.

Thanks
TomB
Jul 19 '05 #1
26 2355
"TomB" wrote in message news:e3******** *****@TK2MSFTNG P11.phx.gbl...
: I have a function on an "included" page.
:
: For reasons unknown to me I frequently will get an error - to the effect
: that the function can't be found.
:
: If I hit refresh/F5 it loads the page just fine.
:
: It doesn't happen often .. maybe once every 50 pages. It also doesn't
: happen on any specific page.
:
: I'd show code, but it's not really related to either the function or any
: specific page.
:
: Is there any sort of a delay between Asp loading the "includes" and
: processing the rest of the page? I'm wondering if the function is getting
: called before the include is pulled in.

Sounds like. Are you trying to call for the function before the page is
fully loaded?

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 19 '05 #2
Roland Hall wrote:
...I'm wondering if the function is getting called before the
include is pulled in.


Sounds like. Are you trying to call for the function before the page
is fully loaded?


If this is truly an ASP issue (rather than client-side), this should not
happen. The #include directive is processed before anything else happens,
and the whole script is parsed, establishing the namespace. Functions get
special treatment -- they can be called from anywhere, even from blocks that
execute first.

I am watching this thread with great interest, as it suggests a real IIS
bug.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #3
> Sounds like. Are you trying to call for the function before the page is
fully loaded?


This would only apply if it's a <script src> on the client.

In ASP, the page doesn't even START "loading" until the #includes are
resolved.
Jul 19 '05 #4
> I have a function on an "included" page.

Can you explain what you mean by "included"? Do you mean #include, or
something else? Why the quotes?
For reasons unknown to me I frequently will get an error - to the effect
that the function can't be found.
Can you show the exact error, as opposed to "to the effect..."?
I'm wondering if the function is getting
called before the include is pulled in.


As I explained in my other reply, this isn't possible. The rest of the ASP
doesn't exist until the #include file contents are injected into the
processing stream.

A
Jul 19 '05 #5
"Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message
news:Om******** *******@tk2msft ngp13.phx.gbl.. .
: > Sounds like. Are you trying to call for the function before the page is
: > fully loaded?
:
: This would only apply if it's a <script src> on the client.
:
: In ASP, the page doesn't even START "loading" until the #includes are
: resolved.

Thanks for including that (no pun intended). (O:= I knew I read somewhere,
but couldn't locate it, that if the include has client script, it still may
not be resolved even though the onload event fired. Perhaps someone can
find that discussion.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 19 '05 #6
> Thanks for including that (no pun intended). (O:= I knew I read
somewhere,
but couldn't locate it, that if the include has client script, it still
may
not be resolved even though the onload event fired.


It would be the client-side script that may not be resolved, not an ASP
function you call from other segments of ASP code.
Jul 19 '05 #7
"Aaron Bertrand [MVP]" wrote in message
news:em******** ******@TK2MSFTN GP11.phx.gbl...
: > Thanks for including that (no pun intended). (O:= I knew I read
: > somewhere,
: > but couldn't locate it, that if the include has client script, it still
: > may
: > not be resolved even though the onload event fired.
:
: It would be the client-side script that may not be resolved, not an ASP
: function you call from other segments of ASP code.

Would that be true even if the ASP included code was client script?

Ex. I have files that are nothing more than client-side javascript code but
need to be wrapped in ASP because I'm mixing values from the server-side,
linking that to a common ASP file that is included in numerous files.

document.shoppi ngform.action=' <%=cartPath%>ch eckout.asp';

Which is linked with:
<script type="text/javascript" src="somejsfile .asp"></script>

....into a file that is included in all others.

This is then included into other files with:
<!--#include virtual="/somepath/somefile.asp"-->

Granted I'm not experiencing the issue the OP is but is this a possibility
for that issue?

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 19 '05 #8
> Granted I'm not experiencing the issue the OP is but is this a possibility
for that issue?


I really don't think so. ASP is executed this way:

#includes are resolved
ASP is processed
Client-side script can proceed

I don't think there are any scenarios where any of these steps can attempt
to cross paths...
Jul 19 '05 #9
"Aaron Bertrand [MVP]" <aa***@TRASHasp faq.com> wrote in message
news:Or******** *****@TK2MSFTNG P10.phx.gbl...
: > Granted I'm not experiencing the issue the OP is but is this a
possibility
: > for that issue?
:
: I really don't think so. ASP is executed this way:
:
: #includes are resolved
: ASP is processed
: Client-side script can proceed
:
: I don't think there are any scenarios where any of these steps can attempt
: to cross paths...

Ok. Thank you.
Jul 19 '05 #10

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

Similar topics

4
2946
by: wongjoekmeu | last post by:
Hello All, >From a book where I have learned C++ it says that each application must have at least one function which is the main() function. Now I have the source code of a C++ program from someone else. But whatever I am doing to search for the main function, I can not find it. There is a very short description of the program in a Readme file where it says that the main program is located in a class "MytoolApp". I've had a look in this...
0
997
by: Earl Teigrob | last post by:
I am having a problem where the bitmap image that I just created and saved to disk can not be found but the code in another area of the program. When I reattempt to access the same image, it always works becuase the image has been fully saved to that drive by that time. Is there a way to make sure that a newly created bitmap image is phisically saved to disk before it is accessed? The code that creates that new bitmap image is as...
3
5077
by: darrel | last post by:
This might be a really dumb question, but when should/shouldn't one use the exit function command? If I have this: function() if something then do this return that else
1
3344
by: plmanikandan | last post by:
Hi, I am using LookupPrivilegeValue to check whether SE_TCB_NAME privilege exists for the user or not in windows 2000 .The value returned from LookupPrivilegeValue function is always true.i checked in administartive tools for the right act as part of operating system is disabled .my code is below //declarations
2
3440
by: i3dmaster | last post by:
I am having a little difficulty to figure out why this unittest for a Thread subclass always fails... # unittest code: class SPThreadUnitTest(unittest.TestCase): def testgetresult(self): from random import randint
12
14442
by: pyramid | last post by:
I am new to C++, and one of the homework we have pertains to Functions. The problem is: Write a function called isValid that determines whether any 3 values can represent the sides of a triangle. The main function should prompt a user to enter 3 sides of a triangle, call isValid and output valid or invalid. The isValid function should have 3 parameters and return a bool. Given sides a, b, c; if a + b > c and a + c > b and b + c > a, then...
1
1404
by: Ioannis Vranos | last post by:
In TC++PL3 on page 676, it is mentioned at the bottom: "I introduced a new Vector (rather than using a valarray) because I needed to define assignment (and assignment must be a member function; 11.2.2). However, valarray is a strong candidate for the representation of that Vector". OK, the assignment must be defined in a way that performs the evaluation of U=M*V+W, so we can't use a valarray directly since it has its assignment...
1
1416
pradeepjain
by: pradeepjain | last post by:
hii guys i am trying to use open filer...but on login its giving this error "auth_pam function not found"..can any one tell abt this auth_pam or any link where i can read abt this.... Thanks, Pradeep
8
2583
by: Anna Smidt | last post by:
I have declared an include file: // gsl.config must be included for correct build with inline correctly defined etc. #include "gsl/config.h" And the compiler says: Error 4 fatal error C1083: Cannot open include file: 'gsl/config.h': No such file or directory
0
9706
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
7616
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6851
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5520
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4297
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
2
3816
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2990
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.