R
Richard
Greetings all.
I have a web-form which requires a text box to be populated
from a select-box choice and I use the following code:
<SCRIPT LANGUAGE="JavaScript">
function UpdateField(index) {
form=document.fLISTINGSadd;
form.x_MEDAL_NAME.value = form.HONOURS.options[index].text
}
</SCRIPT>
and the following in the select box of the form:
<SELECT onChange="UpdateField(this.selectedIndex)"; NAME="HONOURS" style="font-family: MS Sans Serif, Arial, Helvetica; font-size: 7pt; height=11pt; color: #000000; background-color: #F3FFF0">
==========================
The above works brilliantly and behaves exactly as one would expect.
HOWEVER, I need the x_MEDAL_NAME value
to be selected from MORE THAN ONE alternative select box:
HONOURS, CAMPAIGN, SERVICE, commonwealth, other
I have tried:
<SCRIPT LANGUAGE="JavaScript">
function UpdateField(index) {
form=document.fLISTINGSadd;
form.x_MEDAL_NAME.value = form.HONOURS.options[index].text
form.x_MEDAL_NAME.value = form.CAMPAIGN.options[index].text
form.x_MEDAL_NAME.value = form.SERVICE.options[index].text
form.x_MEDAL_NAME.value = form.commonwealth.options[index].text
form.x_MEDAL_NAME.value = form.other.options[index].text
}
</SCRIPT>
but it throws a wobbly!!
I have also tried naming all the select boxes "HONOURS" but that also
throws a wobbly
Could anyone tell me please how to build the array so that the MEDAL NAME
can be selected from any one of the five select boxes instead of only one.
I would use one but there are roughly 1,500 items to choose from and breaking
them down in to their categories makes sense (to me at least!!)
Thanks in advance
I have a web-form which requires a text box to be populated
from a select-box choice and I use the following code:
<SCRIPT LANGUAGE="JavaScript">
function UpdateField(index) {
form=document.fLISTINGSadd;
form.x_MEDAL_NAME.value = form.HONOURS.options[index].text
}
</SCRIPT>
and the following in the select box of the form:
<SELECT onChange="UpdateField(this.selectedIndex)"; NAME="HONOURS" style="font-family: MS Sans Serif, Arial, Helvetica; font-size: 7pt; height=11pt; color: #000000; background-color: #F3FFF0">
==========================
The above works brilliantly and behaves exactly as one would expect.
HOWEVER, I need the x_MEDAL_NAME value
to be selected from MORE THAN ONE alternative select box:
HONOURS, CAMPAIGN, SERVICE, commonwealth, other
I have tried:
<SCRIPT LANGUAGE="JavaScript">
function UpdateField(index) {
form=document.fLISTINGSadd;
form.x_MEDAL_NAME.value = form.HONOURS.options[index].text
form.x_MEDAL_NAME.value = form.CAMPAIGN.options[index].text
form.x_MEDAL_NAME.value = form.SERVICE.options[index].text
form.x_MEDAL_NAME.value = form.commonwealth.options[index].text
form.x_MEDAL_NAME.value = form.other.options[index].text
}
</SCRIPT>
but it throws a wobbly!!
I have also tried naming all the select boxes "HONOURS" but that also
throws a wobbly
Could anyone tell me please how to build the array so that the MEDAL NAME
can be selected from any one of the five select boxes instead of only one.
I would use one but there are roughly 1,500 items to choose from and breaking
them down in to their categories makes sense (to me at least!!)
Thanks in advance