php - How to manipulate URL inside ajax call? -


i trying trigger ajax call on change of dropdown menu(at client_script.php). ajax call send values server_script.php , change div section of client_script.php. problem server script kept in local directory such blocks/latestgrades/server_script.php. when ajax call done url becomes address of server_script.php prepended

 http://localhost/umoodle  

which quite ok, because server_script/php file location such. when hover around other pages, onchange triggeres ajax call tries find server_script.php on location prepended

http://localhost/umoodle/<something_i_dont_want_here>/ 

how alter url cut place dont want , ajax call that?

make sure ajax url absolute url (beginning forward slash) formed root instead of relative current page. example: (url: '/umoodle')


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -