Jump to content

Javascript and AJAX


ATM

Recommended Posts

Hello,Basically, I use Ajax to get the contents of the file; navigation.phpnavigation.php requires some Javascript in the head section, and since navigation.php is requested using ajax it doesn't have a head section.Also the file which has the Ajax can't have the Javascript in the head section because It won't be able to affect the requested data as the data is received after the page is loaded.any suggestions?Thank You.

Link to comment
Share on other sites

Have the Javascript inside the file with the AJAX, and after AJAX loads the file, execute whatever Javascript function you wanted to execute on the other page. So you would have a function called navigation_js or something in the AJAX file, and after the navigation page is loaded you would execute navigation_js() which would run whatever code you wanted to run on the navigation file.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...