Quick help required

D

David

Hi,

I have a dropdown which sets the selected value to a textfield ......
works fine.

If I am setting the values of the dropdown within the codepage, how
could I set 2 columns in the dropdown (if possible), but have 1 column
hidden in the dropdown, but then have the hidden column value dropped
into the textfield

i.e. Dropdown code

<-- £50 (column 1) Brickwork Repair (Column 2) -->

Column 2 is displayed, Column 1 is hidden
On dropdown, Column 1 Value is dropped into the textfield

How is this done, as I only know how to diplay 1 column and drop 1
value

Appreciate your help

David
 
S

scripts.contact

Hi,

I have a dropdown which sets the selected value to a textfield ......
works fine.


Textarea ??
If I am setting the values of the dropdown within the codepage

codepage ??
how
could I set 2 columns in the dropdown (if possible), but have 1 column
hidden in the dropdown, but then have the hidden column value dropped
into the textfield

i.e. Dropdown code

<-- £50 (column 1) Brickwork Repair (Column 2) -->

Column 2 is displayed, Column 1 is hidden
On dropdown, Column 1 Value is dropped into the textfield

How is this done, as I only know how to diplay 1 column and drop 1
value

this : ??

<select onchange="setValue(this)" >
<option blah="£50">Brickwork Repair</option>
<option blah="£60">Brickwork ...</option>
</select>

<textarea id="ta"></textarea>

function setValue(sel){
sel=sel.options[sel.selectedIndex].blah
document.getElementById("ta").value=sel
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top