Gossamer Forum
Home : Products : DBMan : Customization :

HELP!!!! double select box

Quote Reply
HELP!!!! double select box
Hello -

I have been trying to figure out how to do this for days -

I want to do this in the Add A New Record Section

have a pull down menu (select box) with the options a,b,c, ect.. and then when I select option (X) another select box appears or is all ready there that has option (Y). The two select boxes must work together. You only get option (Y) if you had selected Option (X) in the first box.

Can this be done?? If so please post the code and spell it out becose I guess I just dumb.

Thanks
Quote Reply
Re: [TRD2] HELP!!!! double select box In reply to
Hello -

Can anyone convert this script into perl?? or Tell me how to get it running on the html.pl??

thanks

<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><form name="ddmessage"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><select name="selectbox" size="1" onChange="changecontent(this)">
<option selected value="NC">NC</option>
<option value="TX">TX</option>
<option value="MI">MI</option>
<option value="NY">NY</option>
</select><br>
</td>
</tr>
<tr>
<td width="100%"><textarea rows="1" name="contentbox" cols="35" wrap="virtual"></textarea><br>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>

<p>

<script language="JavaScript">

//change contents of message box, where the first one corresponds with the first drop down box, second with second box etc
var thecontents=new Array()

thecontents[0]='Sector 10'

thecontents[1]='Tribe Lone Star'

thecontents[2]='The Knight Hawks'

thecontents[3]='The Knights of The Round Table'


//don't edit pass this line

function changecontent(which){
document.ddmessage.contentbox.value=thecontents[which.selectedIndex]
}

document.ddmessage.contentbox.value=thecontents[document.ddmessage.selectbox.selectedIndex]
</script>
Quote Reply
Re: [TRD2] HELP!!!! double select box In reply to
Were you ever able to get an answer to this?

I'm trying to do related select boxes myself right now. Thanks for any help!
Lynette
Hollister, Ca