473,405 Members | 2,167 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,405 software developers and data experts.

ASP.Net page not including Javascript file.

Hello everyone.

I recently reloaded my system, and I am now having problems getting one
of my client's sites running. I pulled a copy of the development tree
for the project out of subVersion (the source control software we are
using) and placed it into the IIS Web Root. After building and
attempting to run the Solution, I am having problems with included
Javascript files.

How it is set up is that we have some .js files that have common
functions that are reused by the pages. So, we include the .js file in
each page, and the page calls the function(s) on an as-needed basis.
This has previously worked on my machine, and works on the other
developers' machines. When I run it, I get a "Microsoft JScript
runtime error: Object Expected.". I have tried shutting down the
Solution and clearing the VSWebCache, thinking it might be a fragment
from the previous client site that I was using (such as it was looking
for a file that didn't exist in the users site, and it is looking at a
cache somewhere). But, to no avail... I am still stuck.

Here is a fragment of the aspx page in question:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>Client Login</title>
<meta content="Microsoft Visual Studio.NET 7.0" name="GENERATOR">
<meta content="Visual Basic 7.0" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
<link href="styles/default.css" type="text/css" rel="stylesheet">
<!-- javascript code -->
<script language="javascript" src="Scripts/uiEffects.js"></script>
<script language="javascript" type="text/javascript">

function loadPage(){
preLoadImages();
document.getElementById("txtUserId").focus();
}

</script>
</HEAD>

In this case, the uiEffects.js file does not get loaded, or if it does,
the preLoadImages() function in the loapPageFunction() is not being
found, as this is where the message is firing. If I look at the
Running Processes, I can see that uiEffects.js is not listed, as it
usually would be if it was loaded. There are no other error messages
until I hit the call for a function that is within the included file.

Any help would be greatly appreciated, as I am dead in the water until
I can get this resolved.

Thank you in advance,

Joseph
jo***********@gmail.com

Nov 19 '05 #1
3 1700
Hi Joseph,

Is it possible that the Scripts directory was previously created as a
virtual directory in IIS and needs to be set that way again?

What happens if you put the full URL such as

src="http://myserver/Scripts/uiEffects.js">

Just trying a couple of ideas to get you going again...

Ken
Microsoft MVP [ASP.NET]
Toronto

"Joseph Ferris" <jo***********@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hello everyone.

I recently reloaded my system, and I am now having problems getting one
of my client's sites running. I pulled a copy of the development tree
for the project out of subVersion (the source control software we are
using) and placed it into the IIS Web Root. After building and
attempting to run the Solution, I am having problems with included
Javascript files.

How it is set up is that we have some .js files that have common
functions that are reused by the pages. So, we include the .js file in
each page, and the page calls the function(s) on an as-needed basis.
This has previously worked on my machine, and works on the other
developers' machines. When I run it, I get a "Microsoft JScript
runtime error: Object Expected.". I have tried shutting down the
Solution and clearing the VSWebCache, thinking it might be a fragment
from the previous client site that I was using (such as it was looking
for a file that didn't exist in the users site, and it is looking at a
cache somewhere). But, to no avail... I am still stuck.

Here is a fragment of the aspx page in question:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>Client Login</title>
<meta content="Microsoft Visual Studio.NET 7.0" name="GENERATOR">
<meta content="Visual Basic 7.0" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
<link href="styles/default.css" type="text/css" rel="stylesheet">
<!-- javascript code -->
<script language="javascript" src="Scripts/uiEffects.js"></script>
<script language="javascript" type="text/javascript">

function loadPage(){
preLoadImages();
document.getElementById("txtUserId").focus();
}

</script>
</HEAD>

In this case, the uiEffects.js file does not get loaded, or if it does,
the preLoadImages() function in the loapPageFunction() is not being
found, as this is where the message is firing. If I look at the
Running Processes, I can see that uiEffects.js is not listed, as it
usually would be if it was loaded. There are no other error messages
until I hit the call for a function that is within the included file.

Any help would be greatly appreciated, as I am dead in the water until
I can get this resolved.

Thank you in advance,

Joseph
jo***********@gmail.com


Nov 19 '05 #2
Ken,

That was precisely what was going on. I removed the existing Scripts
Virtual Directory and recreated it. Worked perfectly.

Thank you, kindly,

Joseph
jo***********@gmail.com

Nov 19 '05 #3
Hey Joseph,

Glad that was it!

Ken

"Joseph Ferris" <jo***********@gmail.com> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...
Ken,

That was precisely what was going on. I removed the existing Scripts
Virtual Directory and recreated it. Worked perfectly.

Thank you, kindly,

Joseph
jo***********@gmail.com


Nov 19 '05 #4

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

Similar topics

8
by: Aspersion | last post by:
I'm building an ASP page that has a lot of text and graphics. There is a calculation facility on the page. The user enters several numbers in a form and presses a button to see the calculated...
7
by: Aaron Prohaska | last post by:
I have just run into a problem where I have a page that posts back to itself to execute code, except when the page does the post back it somehow executes code that is in our home page for the site....
4
by: Jake Lewis | last post by:
I have an HTML page that loads fine including the .js file <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> <script...
8
by: David D. | last post by:
In html, one can say <script language="JavaScript" src="http://someCodeSnippet.js"> Is there any way to embed the included code snippet in a function (in the case where it is not already a...
4
by: JoelWhitehouse | last post by:
Hi! I want to write a script that will read a .php file on a remote server and print to the current page a portion of the text contained in the remote file. I am just wondering what the best...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
2
by: david | last post by:
I write JavaScript for client side computing in HTML file in ASPX design. However, I found that the variables declared in JavaScript are initialized again when the page post back to the server....
3
by: GroupReader | last post by:
I posted a similar question earlier and got lots of good feedback, but now I have more information: Problem: I have javascript in a user control that is not "loading" properly. When I try to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...
0
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...
0
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...
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
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,...
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...

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.