patrickm Posted April 12, 2007 Share Posted April 12, 2007 Hello everybody. Hopefully you can help me with a small thing I'm working on. I am designing a page on which helps visitors determine which product they need by answering some questions/making certain selections. I've copy/pasted a working routine, but it is a very crude method. Note: on the spot where it displays the variables, there will be eventually a routine which will send a request to a MySQL database and display the outcome. <table width="600" cellspacing="0" cellpadding="0" border="0"> <tr> <td width="200" valign="top"> <?php echo "<form action=\"selector.php\" method=\"post\">\n"; echo "<select name=\"situatie\">"; echo "<option value=\"binnen\""; if ($situatie == "binnen"){ echo " selected "; } echo ">Binnen situatie</option>\n"; echo "<option value=\"buiten\""; if ($situatie == "buiten"){ echo " selected "; } echo ">Buiten situatie</option>\n"; echo "</select>"; echo "</select>\n\n"; echo "<br><br>\n\n"; echo "<select name=\"type\">"; echo "<option value=\"aanslag\""; if ($type == "aanslag"){ echo " selected "; } echo ">Aanslagdeuren</option>\n"; echo "<option value=\"pendel\""; if ($type == "pendel"){ echo " selected "; } echo ">Pendeldeuren</option>\n"; echo "<option value=\"wissel\""; if ($type == "wissel"){ echo " selected "; } echo ">Wisseldeuren</option>\n"; echo "</select>"; echo "</select>\n\n"; echo "<br><br>\n\n"; echo "<input type=\"submit\" name=\"submit\" value=\" Go! \" class=\"button\">\n"; ?> </td> <td width="400" valign="top"> <?php echo "$situatie"; echo "<br>"; echo "$type"; ?> </td> </tr> </table> Is it possible to use mouseover on each selection-field seperately (instead of all of them at once using a "submit" button) to display the outcome without using "reload the same page" ?? In other words, I want to create a page with "life" (MySQL) results as soon as a visitor changes one of the selection fields. Quote Link to comment https://forums.phpfreaks.com/topic/46698-item-selection-mouseover/ Share on other sites More sharing options...
patrickm Posted April 13, 2007 Author Share Posted April 13, 2007 I could not find an edit button ??? One thing I put in my previous post wrong: it shouldn't work on onmouseover, but onmouseout. Sorry about that. Quote Link to comment https://forums.phpfreaks.com/topic/46698-item-selection-mouseover/#findComment-228314 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.