- I have 2 HTML files - file1.html in xyz directory and file2.html in abc directory ... both the directories are at different levels.
- Now, I have a external JS file in which I have used jQuery UIAautocomplete widget and I have used datasource URL for ajax call as a PHP file say datasource.php ...
Here I mentioned data source URL as absolute URL of that PHP file and I included that external js in file1, file2 mentioned in step 1, and everything works fine.
Now my issue is instead of using that datasource file as absolute ... how can use it as relative or can send it via some variable from the HTML files.. so that it can work fine from file1.html as well as file2.html even without using absolute URL.