hi is there a wait to load a full url.?
url= 'http://www.example.com/whatever.php'
$('#selector').load(url); // this way returns null (empty result)
instead of :
url = 'whatever.php'
$('#selector').load(url); // works fine
Some may think whats the difference i want to use this because im using multiple directories. so i could be on a page like…
example.com/dir/
but the dir folder will not have the whatever.php
so anyone has a fix for this that i should always use the full url?
thank you.
You could always use relative paths
putting
/before the path will tell the browser to go the root of the page. For your example you could call/whatever.php.You can also move up one directory at a time. Lets say you are in a page at
http://www.example.com/dir/foo/bar.phpand want to access something in the dir folder, you could specify../inTheDir.phpto move up one directory or../../inTheRoot.phpto move up two.This should work for you, but based on your comment it sounds like you have a problem somewhere else since your
www.page doesn’t seem to respond correctly.