473,569 Members | 2,526 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to refer path in Javascript

ad
I place a Loading.aspx in the Util folder of my project, Util folder in in
the root directory.
I refer Loading.aspx in this way: ~/Util/Loading.aspx in Javascript, But it
fail to find Loading.aspx in run time.
How can I refer Loading.aspx in Javascript?
Below in the actual code:
----------------------------------------------------------------------------
----------------------------------------
JavaScript += "function
_ShowLoadingWin dow(){LoadingWi ndow=window.sho wModelessDialog ('~/Util/Loading
..aspx','','dia logWidth:350px; dialogHeight:20 0px');}";
Nov 19 '05 #1
1 1409
You cannot use ~ (tilde) in client-side code. You need to register this code
in code behind the grab the root folder using request object.

"ad" <ad@wfes.tcc.ed u.tw> wrote in message
news:e5******** ******@TK2MSFTN GP14.phx.gbl...
I place a Loading.aspx in the Util folder of my project, Util folder in in
the root directory.
I refer Loading.aspx in this way: ~/Util/Loading.aspx in Javascript, But
it
fail to find Loading.aspx in run time.
How can I refer Loading.aspx in Javascript?
Below in the actual code:
----------------------------------------------------------------------------
----------------------------------------
JavaScript += "function
_ShowLoadingWin dow(){LoadingWi ndow=window.sho wModelessDialog ('~/Util/Loading
.aspx','','dial ogWidth:350px;d ialogHeight:200 px');}";

Nov 19 '05 #2

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

Similar topics

1
3114
by: MK | last post by:
What would be the best platform-independent way to refer to the current (execute) path for a Python script? self.dirname = ??? This variable should contain directory name for the current path. It should work on every platform (Linux, Windows...). I'm not interested in parsing this string. That is, simple f.write(self.dirname)
2
28953
by: somaskarthic | last post by:
Hi In my php page my i'm displaying a image. The image resides in the same location where the php page resides. when i refer other image src other than in the document root , it is not working. /var/www/html is the document root. My php page and the image resides in var/www/html folder. I could access it as http://localhost/mypage.php. It...
2
6224
by: Radu | last post by:
Hi. I have files in the "Scorecard Previews" subfolder of the virtual path of my app, the absolute path being C:\Data\Ordering Process\Scorecard Previews\ I have a javascript function which changes the href of an <a>
3
1546
by: laredotornado | last post by:
Hi, If I have this include on my HTML page <script type="text/javascript" src="scripts/myScript.js"></script> How, from within "myScript.js" can I refer to the path of myself? In other words, I would like to store in a variable the path WEBROOT/ scripts/myScript.js.
0
7700
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
7614
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...
1
7676
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7974
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6284
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...
1
5513
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...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2114
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
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.