I have a problem with my code. I have this simple ajax code which loads, according the link the user has clicked, the page into the content div. I have a form to which the users can put their information and kinda register. The form is checked with php, that everything written in the form is valid. Now the thank you and the error pages load into a new page, because they are two different php files. How can I get them to load inside the content div as well and not into the new page? Cause there isn't really any link to those pages, they just go there according to the result of the checkup.
Generally, you would simply do that with PHP -- requiring a refresh of the entire page. The second best thing is using an IFRAME and just target the IFRAME when submitting the FORM. The final choice is 100% JavaScript using AJAX to pass the formdata to PHP and load the response into the content div.
Bookmarks