Jump to content

Item selection + mouseover ?


patrickm

Recommended Posts

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.