I would like to make a site run almost entirely on Ajax navigation with PHP server side pages. I'm running into a few problems however. I want my main page to stay the same (the div layout page), however when navigating through pages, the variables set on the main page don't persist on the "responseText" that is pulled up through Ajax (since Ajax just pulls the HTML/XML, not an actual page).
Could anyone help me out with this or point me toward a tutorial that could?
AJAX navigation in PHP
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
I would concur with Jcart on advising NOT to use it.
but to answer your question:
you'll need to pass the variable information in the form of POST or GET data to the server-side page. From there you can do with it what you want then send it back to the client in a string. What I've done in similar situations is use the split() method to break apart my string and use the different elements of the array accordingly.
but to answer your question:
you'll need to pass the variable information in the form of POST or GET data to the server-side page. From there you can do with it what you want then send it back to the client in a string. What I've done in similar situations is use the split() method to break apart my string and use the different elements of the array accordingly.