People can always see your javascript. This is a server/application
issue.
If it's one or two files of a simple application you could do some url
rewriting in an .htaccess file, but otherwise application routing is a
pretty big discussion outside the scope of the mootools group.
Ryan Florence
[Introducing MooDocs - become a better developer] ( http://blog.flobro.com/
)
On Nov 24, 2009, at 11:56 AM, Sudheer wrote:
Hi,
I have a question regarding how to specify a URL for a JSON request.
Here is my directory structure
htdocs
|
|----members
| |---MyHome.php
| |---fetchMyOrders.php
|
|----common
My current JSON request looks like as follows and it works fine. (I
have provided only partial code here)
var ajaxRequest = new Request.JSON({
url: "fetchMyOrders.php",
method: 'get',
async: false,
.
.
I can move the file fetchMyOrders.php to "common" directory and change
the url part of the request to "../common/fetchMyOrders.php" and that
works too.
Now the question is, is there a way by which I can provide this path
in a more elegant way and not specify the whole "../common" part of
the URL? Actually I will put a lot of PHP scripts in that "common"
directory and I don't want anyone looking at my JS code to figure out
the directory structure of the server.
Thanks
Sudheer