View Full Version : List box combinations

05-02-2009, 02:43 AM
Hi guys,

Here is the code for part of a form on my website:
<td class="style35">Print size:</td>
<td><span class="style37">
<select name="printsize" id="printsize">
<option value="8 x 12 (inches) - $20">8 x 12 (inches) - $20</option>
<option value="12 x 18 (inches) - $35">12 x 18 (inches) - $35</option>
<option value="18 x 24 (inches) - $50">18 x 24 (inches) - $50</option>
<option value="24 x 36 (inches) - $75">24 x 36 (inches) - $75</option>
<td class="style35">Framing/Mounting:</td>
<td><select name="framing" id="framing">
<option value="Print only" selected="selected">Print only</option>
<option value="Framed">Framed</option>
<option value="Mounted on wood">Mounted on wood</option>
<option value="Canvas">Canvas</option>

<td class="style35">Final cost:</td>
</tr>I want a text number to appear in the place of the &nbsp; at the end when print size option is selected and a framing option is selected. There is a different price for each combination.

How can this be done?

Thanks for any help!

05-02-2009, 03:17 AM
sounds like a job for a database needed to me. php would be my weapon of choice

05-03-2009, 08:37 AM
This is a code I had in an assignment I had to do where the user would click an option from the drop-down menu, and then text would appear in the text box.

So this code can't be changed to be used with more than one drop-down menu?

<form name="theform">
<select name="from" onChange="passvalue()">
<option value="">select subject
<option value="Imagined Corners, edited by Ken Watson
Brave New World, written by Aldous Huxley
Blade Runner, directed by Ridley Scott
King Lear, written by William Shakespeare">English
<option value="Year 12 Cambridge Mathematics, 2 unit (second edition)">Maths (2 unit)
<option value="Year 12 Cambridge Mathematics, Extension 1 (second edition)">Maths (Extension 1)
<option value="Artwise
From Caves to Canvas
Art Now">Visual Art
<option value="Fire on the Water
Eyes on Stalks">Drama
<option value="Heinemman Information and Processes Technology: HSC course">Information and Processes Technology (IPT)
<textarea name="to" id="to" cols="45" rows="5"></textarea>