PDA

View Full Version : List box combinations


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

Here is the code for part of a form on my website:
<tr>
<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>
</select>
</span></td>
</tr>
<tr>
<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>
</select></td>
</tr>

<tr>
<td class="style35">Final cost:</td>
<td>&nbsp;</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!

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

c_gem45
05-03-2009, 09: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)
</select>
<P>
<textarea name="to" id="to" cols="45" rows="5"></textarea>
</form>