Hope I am posting this in the right forum
and I hope someone can help me with this.
I have a page (called page1.php) that has 2 divisions, 1- leftcolumn and 2 - rightcolumn. On this page I have the following code from which the user chooses one of the links.
These are choices that get passed on to page2.php which takes the users choice and uses it to retrieve data from the database. In other words, get all the data matching series 21, 22 or 23.
Code:
<a href="javascript:ajaxpage('page2.php?series=21', 'rightcolumn');">Series 21</a>
<a href="javascript:ajaxpage('page2.php?series=22', 'rightcolumn');">Series 22</a>
<a href="javascript:ajaxpage('page2.php?series=23', 'rightcolumn');">Series 23</a>
As you can see, the href calls an ajaxpage() function that returns result into a division called 'rightcolumn' on page1.php. The above works just fine because they simply pass on static numbers.
What I want to do now is pass on 2 variables to page2.php that are user inputs. One is a text input, the other a dropdown variable. The user fills in the text input, chooses a selection from the dropdown and then clicks a submit button (or a URL link or whatever). The idea behind this is that I present the user with a search input which calls the MySQL database routine on page2.php using the 2 variables and presents the results into the rightcolumn division of page1.php.
I can do this using the following form, but how do I call the ajaxfunction at the same time so that the result will appear in the 'rightcolumn' division?
Code:
<form action="page2.php" method="post">
Choose Search Type:<br />
<select name="searchtype">
<option value="21">Series 21
<option value="22">Series 22
<option value="23">Series 23
</select>
<br />
Enter Search Term:<br />
<input name="searchterm" type="text" size="40">
<br />
<input type="submit" name="submit" value="Search">
</form>
Anybody have any ideas or suggestions on how to accomplish this?
I've done hours of searching and I am only getting bits and pieces which makes everything even more confusing.
Thanks