I am currently working on the standard 'Yahoo Hosted Web Search' scripting but having a few issues.
On the search box on my homepage (index.html) you enter a query then hit submit for a yahoo search to return results on the same page.
This submit action triggers the yahoo javascript on the homepage to return search results on the same page via the placing of an appropriate div within which a results iframe loads.
THE FULL PROCESS SCRIPTING IS AS FOLLOWS:
=============================================================
< form id="searchform" onsubmit="return search();">
<input type="text" id="searchbox" size="10" />
<input type="submit" value="Submit"/>
</form >
:
=====================================================================
<script type="text/javascript">
function search() {
YHS.search(document.getElementById("searchbox").value);
</script>
=====================================================================
EXTRACT COMMAND:::::::::::::::::::
dom_id: "bossDiv", // id of div tag under which BOSS Hosted Search iframe will be rendered
=====================================================================
<div id="bossDiv">
</div>
This is the empty div tag within which the BOSS Hosted Search experience will be shown. You will need to replace the with this div id ('bossDiv') in the Javascript code snippet
===============
Now basically i would like to ensure that my results are presented on a 2nd page not the homepage. The issue is the DIV TAG: ID 'bossDiv' loads the iframe on the homepage.. is there anyway i can insert this DIV into say results.html and have the homepage somehow command the div on the results.html page to display the search results there instead?
Been trying so hard to try form actions etc but the only way i can see that this will work is if i simply insert the div into the results.html page and somehow tell the yahoo javascript on index.html where to find the DIV or redirect the page to find and trigger the DIV ?? Does anyone know of a way to tell a java where to find a div on another page to trigger and action it there upon a query search submit..?
Please help its been wrecking my brain for at least 2 weeks now and i dont know what steps to take anymore from reading alot of jumble online :(
Thank all!