473,479 Members | 2,060 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

File Paths And AJAX


Hi. I am doing an AJAX 'GET'. How do i know how to form the url string
for folders in different locations in the directory? So, for the
following request:

request.open("GET", url, true);

the page that the request is being made from is, say, @ "e" :

a---|
| |
| ---c
b |
|
---d
|
|
e

and I want to pass the url @ location "b". right now I am doing
url = "~a/b.aspx" from location "e" but that isn't working. how do i
do this?

thanks.

Mar 28 '07 #1
3 1301
pbd22 wrote:
>
Hi. I am doing an AJAX 'GET'. How do i know how to form the url string
for folders in different locations in the directory? So, for the
following request:

request.open("GET", url, true);

the page that the request is being made from is, say, @ "e" :

a---|
| |
| ---c
b |
|
---d
|
|
e

and I want to pass the url @ location "b". right now I am doing
url = "~a/b.aspx" from location "e" but that isn't working. how do i
do this?

thanks.
Hi,

I think you are making things unneeded difficult for yourself.
Why not place your AJAX files in some directory, and use a full URL to
access it instead of bothering with relative paths?

Regards,
Erwin Moller
Mar 28 '07 #2
pbd22 said the following on 3/28/2007 10:00 AM:
Hi. I am doing an AJAX 'GET'. How do i know how to form the url string
for folders in different locations in the directory? So, for the
following request:

request.open("GET", url, true);

the page that the request is being made from is, say, @ "e" :

a---|
| |
| ---c
b |
|
---d
|
|
e

and I want to pass the url @ location "b". right now I am doing
url = "~a/b.aspx" from location "e" but that isn't working. how do i
do this?
Save yourself a ton of headaches. Forget relative URL's and use an
absolute URL.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Mar 28 '07 #3
On Mar 28, 8:42 am, Randy Webb <HikksNotAtH...@aol.comwrote:
pbd22 said the following on 3/28/2007 10:00 AM:
Hi. I am doing an AJAX 'GET'. How do i know how to form the url string
for folders in different locations in the directory? So, for the
following request:
request.open("GET", url, true);
the page that the request is being made from is, say, @ "e" :
a---|
| |
| ---c
b |
|
---d
|
|
e
and I want to pass the url @ location "b". right now I am doing
url = "~a/b.aspx" from location "e" but that isn't working. how do i
do this?

Save yourself a ton of headaches. Forget relative URL's and use an
absolute URL.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/

thanks guys.

Mar 28 '07 #4

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

Similar topics

11
3576
by: BoonHead, The Lost Philosopher | last post by:
I think the .NET framework is great! It's nice, clean and logical; in contradiction to the old Microsoft. It only saddens me that the new Microsoft still doesn't under stand there own...
20
1573
by: John | last post by:
Hi When I create a setup for my application, it installs all files for the app in C:\Program Files\MyCo\MyApp folder. How can I have some of the files to be installed under :\Program...
6
2018
by: Ozz | last post by:
Hi there, I have a link on my web page. When clicked, opens up a pdf file that is stored on my server. Every file is specific to a user's user name and I don't want users to see each other's...
1
6431
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
10
18829
by: Eric | last post by:
Hello, I have some server side includes on a Classic asp page that look something like: <!-- #include virtual="/includes/file1.asp"--> <!-- #include virtual="/includes/file2.asp" --> <!--...
2
151623
by: antonyliu2002 | last post by:
I am testing AJAX. I've downloaded the AJAX Extension and the CTP December package and installed on BOTH my development machine and the production server. Then I created a very very simple web...
5
4619
by: Eugene Anthony | last post by:
ds1.Tables.Rows.ItemArray.GetValue(0).ToString() contains the string path: images/5/Video1/qbert.flv if (File.Exists(ds1.Tables.Rows.ItemArray.GetValue(0).ToString())) { //code to execute } ...
16
4648
by: Hans Fredrik Nordhaug | last post by:
I'm trying to write to a file in the current directory - no remote files. The subject says it all - I can add that both the directory and the file is wordwritable. This happens on a (quite good)...
7
6604
by: sudhaMurugesan | last post by:
Hi all, I use asp.net with c#. I upload a file and save in a directory. I want to reopen the file so i check for file exists and then open it. But though the file exists, the...
0
7027
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
7071
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...
1
6726
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
6861
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
5318
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
2987
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...
0
2974
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
557
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
170
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...

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.