Hmmm, I thought this would be awkward. Here is some of the code, then my explanation:
<form id="frmSearch" action="searchSuggest.php">
<input type="text" id="txtSearch" name="txtSearch" alt="Search Criteria" onkeyup="searchSuggest();" autocomplete="off"/>
<input type="submit" id="cmdSearch" name="cmdSearch" value="Search" alt="Run Search" onclick="window.location"displayResult.php?(document.getElementById('txtSearch').value)"/><br />
<div id="search_suggest">
As you can see above the text from the input button is used to search for an item from a table, could be a name anything, onkeyup() calls a javascript ajax routine that echoes anything in the table that may correspond to what a user enters into the input box. what I'm trying to achieve with the submit button is send the data from the input box to displayResult.php which displays the result of the first search (which came via sarchSuggest,php). I was hoping the onclick event for the submit button would do the job but it doesn't. Makes your head hurt don't it.
Not quite basically, the contents of the input box depends on the result achieved by the user typing one letter at a time and the data is listed dynamically into a div like google suggest. For instance the names DAVIES and DAWSON, when the user types D the names DAVIES and DAWSON appear in a <div> and the user clicks on either name and fully populates the input box.
It is now that I want to click the submit button and use the full name as a new search criteria.
Ouch my eyes are bleeding just reading that ;O)
I really need a workaround for this, please , please help. thanks muchly in advance for any help guys.
Chris