Forum Moderators: open
I have a javascript function which loads a page into a div:
function loadContent() {
$("#liveScores").load("mypage.php");
}
This works fine if I'm in the root of my website:
domain.com/page.php
however I have several rewritten urls (mod rewrite) on the site with paths such as:
domain.com/folder1/page.php
domain.com/folder2/page.php
domain.com/folder3/page.php
when trying to utilise the loadContent function on the rewritten pages I receive an 'Object Expected' error, i.e. mypage.php is not being loaded into the div.
I've tried adjusting the path, i.e.
$("#liveScores").load("../mypage.php");
$("#liveScores").load("/mypage.php");
etc, but consistently receive the same error message. Does anyone know how I can resolve this?
Thanks