1
$("#popMenu-fk").load("secure/student.php");

The calling files rests in folder "a" while the php script is in "a/Secure" folder. However, I am not being able to access that file from that path, but if I paste the file in same folder as calling file and use

$("#popMenu-fk").load("student.php");

it works!

Am I going wrong somewhere? Thanks!

2 Answers 2

5

try:

$("#popMenu-fk").load("../a/secure/student.php");

That way no matter where you call this code from it knows where to go assuming that "/a" is right above the root and the code resides a single level above the root as well.

like if I have two folders...

<root>/js
<root>/ajax

and in the ajax folder I have a file caleld ajaxCalls.ashx

If i have a .js file in the js folder and I want to make ajax calls to the ajaxCalls.ashx file I would do something like

    url: "../ajax/ajaxCalls.ashx"
Sign up to request clarification or add additional context in comments.

1 Comment

no problem... i ran into the same issue a while back trying to do virtually the same thing.
0

If you are on Linux then the file names are case sensitive and you have different casing in your sample, so maybe that is your problem?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.