How do I AJAX to a parent path ?

Get help using Construct 2

Post » Mon Aug 17, 2015 9:29 am

How do I AJAX to a path outside the current folder ?
Example: www.BBB.com/Test/index.html. [This is where Construct 2 is]

Ajax to parent path e.g. www.BBB.com/a.php [One Folder Up]
B
12
S
3
Posts: 288
Reputation: 1,694

Post » Mon Aug 17, 2015 4:59 pm

Anyone ?
B
12
S
3
Posts: 288
Reputation: 1,694

Post » Mon Aug 17, 2015 6:01 pm

haven't tried it, but in HTML you would add the prefix ../

so, from your Test folder you would ask for "../a.php"

Edit: just looked at an old project where I used ajax to call php files, and I was just specifying the whole url. So I would expect that "http://www.bbb.com/a.php" would work. (The file I was calling was up twp levels, then down another directory.)
B
99
S
35
G
20
Posts: 438
Reputation: 17,910

Post » Mon Aug 17, 2015 9:46 pm

AllanR wrote:Edit: just looked at an old project where I used ajax to call php files, and I was just specifying the whole url. So I would expect that "http://www.bbb.com/a.php" would work. (The file I was calling was up twp levels, then down another directory.)


Yea, like @AllanR says, just call the base URL exactly where your application is: "http://www.bbb.com/a.php"
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests