PDA

View Full Version : Using Double ComboBox in a Form (ASP/CDONTS).


Khrysller
09-06-2002, 02:09 PM
Hello People

I´m using the Double ComboBox Script in a form, and I need to Get the Value and send it trought e-Mail.

The "original" ComboBox works fine, for example:

<option value="iNFO">iNFORMAÇÃO</option>

And the ASP script send me the "iNFO" via e-Mail without trouble. But the Double ComboBox Script doesn't....example:

<form name="doublecombo">
<select name="Local_1" size="1" onChange="redirect(this.options.selectedIndex)">
<option selected value="Selecione....">Selecione....</option>
<option value="Aciaria">Aciaria</option>
</select>
<select name="Local_2" size="1">
<option value="&nbsp;">&nbsp;</option>
</select>
</p>
</p>

<script>
<!--

var groups=document.doublecombo.Local_1.options.length
var group=new Array(groups)
for (i=0; i<groups; i++)
group[i]=new Array()

group[0][0]=new Option("")

group[1][0]=new Option("Selecione...")
group[1][1]=new Option("BR3 (Pátio de Sucata)")

var temp=document.doublecombo.Local_2

function redirect(x){
for (m=temp.options.length-1;m>0;m--)
temp.options[m]=null
for (i=0;i<group[x].length;i++){
temp.options[i]=new Option(group[x][i].text,group[x][i].value)
}
temp.options[0].selected=true
}

function go(){
parent.frames.footer.location=temp.options[temp.selectedIndex].value
}
//-->
</script>
</form>

There's a way to force the script to use a value to ASP component get like it gets in the "normal" ComboBox?

Thanks in Advance People :)