Ajax - how to make every link/form on the page reload only part of that page?

klotek

New Member
I have a website, and I want to keep part of it static. Now, in order to do that, I need to replace single div, something like that:\[code\]<html> <head> </head> <body> <div id="contentToReplace"> </div> <div id="myStaticContent"> </div> </body></html>\[/code\]Now, how can I catch all clicks on anchors and clicks on forms submit button, and reload \[code\]contentToReplace\[/code\]? I tried using \[code\]jQuery.load()\[/code\] and it was perfect, but it was not loading scripts, and I need those. Also, I don't know how to submit forms with ajax requests.
 
Top