php/js - how to load returned data in a different page?
Posted: Tue May 11, 2010 4:48 am
Okay, I guess I need a conceptual help here. I am not sure if it is the right forum to ask but it's more like a php issue than pure javascript.
Here is the scenario:
1. I have a search box on home page
2. when users click the search button, a javascript function is triggered
3. on homepage I have an empty div that I'd like to populate with the search results
4. the javascript function calls php (assynchronous calls)
5. php returns some data (in xml format)
6. the javascript parse the xml data
7. the javascript function assign that data into the empty div
8. User sees search result on home page.
I've managed to do all of these. Now I need to know -
1. How can I display the search results on search_result.php page and not on home page. i.e How do I tell javascript to load that search result into a particular page?
(if anyone is interested, I am using google map API to get the search result, and is then gets displayed with the data itself and matching map. i.e map plotting)
Thanks for your help.
Here is the scenario:
1. I have a search box on home page
2. when users click the search button, a javascript function is triggered
3. on homepage I have an empty div that I'd like to populate with the search results
4. the javascript function calls php (assynchronous calls)
5. php returns some data (in xml format)
6. the javascript parse the xml data
7. the javascript function assign that data into the empty div
8. User sees search result on home page.
I've managed to do all of these. Now I need to know -
1. How can I display the search results on search_result.php page and not on home page. i.e How do I tell javascript to load that search result into a particular page?
(if anyone is interested, I am using google map API to get the search result, and is then gets displayed with the data itself and matching map. i.e map plotting)
Thanks for your help.