Ajaxthe combination of XHTML, CSS, DOM, XML, XSLT, XMLHttpRequest, and JavaScript
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Ajax section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
I have a search page on my site that's a part of a template so there is a lot of code on it.
Is there a way to use Ajax (or another way) to call the search page from a calling page and pull out the contents of the Div that the search results are in and display then in the calling page?
Then you'll need to look into manual construction of the AJAX interaction using the XMLHttpRequest object. There many be other AJAX frameworks that you could use for the CMS you are working in however. Do some searching for that.
I was able to successfully pull the search page back and place it in the calling page div (id="target"). How do I reference a particular div (id="searchresults") on the search page where the search results are displayed and send that to the calling page div?