PDA

View Full Version : specs after selecting from listbox?


raptori
01-26-2003, 06:45 AM
Hi,
I know i have seen this script somewhere and i don't know were so i will try to explain it the best i can.

lets say i have 2 computers....

computer 1:
P4 3.2 GHz
128MB DDR
and 10/100 network card
and so on....

computer 2:
P5 6.2 GHz
910MB DDR
and 100/1000 network card
and so on....


my question is, where can i find the script that when i choose computer 1 or 2 it will display its specifications in a textbox?:)

thank you,
-raptori

Algorithm
01-26-2003, 06:56 AM
<script type="text/javascript"><!--
var comps = ["",
"P4 3.2 GHz\n128MB DDR\nand 10/100 network card\nand so on....",
"P5 6.2 GHz\n910MB DDR\nand 100/1000 network card\nand so on...."
];
//--></script>
<form>
<select onChange="this.form.txtbox.value=comps[this.selectedIndex];">
<option>Select a computer</option>
<option>Computer 1</option>
<option>Computer 2</option>
</select><br />
<textarea name="txtbox"></textarea></form>

raptori
01-26-2003, 07:39 AM
sweet it worked.... thanks Algorithm.