...

View Full Version : Option selection with 2 values



lebronletchev
02-12-2007, 03:40 PM
Hi friends,

It is strange, I know. I donīt know if it is a question for JS experts or ASP experts also!

I want access an Asp script which access an MSAccess table!

It is I did:



<div align=center>
<TD>
<TABLE bgColor=#e5e5e5 border=0 cellPadding=0 cellSpacing=0
height=40>
<FORM action="frases2.asp" method=get onSubmit="return verifica(this);">
<TBODY>
<TR align=middle vAlign=center>
<TD align=right height=40 noWrap>&nbsp;</TD>

<TD>&nbsp;&nbsp;<SELECT name="look_for"><OPTION selected
value="empina" value2="codo">empinar el codo<OPTION value="anda" value2="gorra">andar de gorra
<OPTION value="a pie" value2="juntillas">a pie juntillas
&nbsp;&nbsp;&nbsp;&nbsp;<OPTION value="hac" value2="menudo">hace mala sangre
</OPTION>

</SELECT>&nbsp;&nbsp;</FONT>
<CENTER></CENTER></TD>
<TD><input type="button" value="Go!" style="height : 25; width : 30;" onClick="makeWord(this.form.look_for)">
&nbsp;</TD></TD></TR></FORM></TBODY></TABLE></TD></div>


Can you see I create two VALUES (value and value2). How I dod this works fine?

value it is a field value2 it is another field.

Thank you in advance

LeBRON LeTCHEV

vwphillips
02-12-2007, 05:21 PM
value="fred,tom"


then
var val=value.split(',')=
and

val[0]='fred';
val[1]='tom';

the reverse

var val=['fred','tom'];

options[1].value=val.join(',');



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum