jquery.js etc not included in php file called through ajax
Posted: Tue Jan 27, 2009 5:21 am
I have included some jquery libraries like jquery.js, thickbox.js and CSS files in my main php file i.e. main.php and they are included properly and all jquery code is working fine in all related pages/files.
As per my requirement, I am calling ajax.php to show some content on right column of main.php file though ajax(without reloading the page). The right column content is also coming properly.
The ISSUE is : When I am using the same jquery code in this ajaxified content, it does not work. I have tested several jquery codes that I have tested in other pages but no output through this ajax content.
Now, one thing that I noticed is that this ajax.php file is not in the same directory as main.php. Also, I cannot move that to same directory due to some reasons. So, I thought that may be the relative file paths defined in <head> to include jquery and css files may be the issue. Just to test, I replaced relative paths with absolute paths but still no library was able to work with this ajax content. I have tested a lot from my side but still not understand the reason/s behind this problem.
Could anyone please suggest me the missing part or mistake/s that I am doing while performing the above process?
As per my requirement, I am calling ajax.php to show some content on right column of main.php file though ajax(without reloading the page). The right column content is also coming properly.
The ISSUE is : When I am using the same jquery code in this ajaxified content, it does not work. I have tested several jquery codes that I have tested in other pages but no output through this ajax content.
Now, one thing that I noticed is that this ajax.php file is not in the same directory as main.php. Also, I cannot move that to same directory due to some reasons. So, I thought that may be the relative file paths defined in <head> to include jquery and css files may be the issue. Just to test, I replaced relative paths with absolute paths but still no library was able to work with this ajax content. I have tested a lot from my side but still not understand the reason/s behind this problem.
Could anyone please suggest me the missing part or mistake/s that I am doing while performing the above process?