Forum Moderators: open

Message Too Old, No Replies

Dropdown Box and no selection made.

         

aax123

1:28 pm on Oct 13, 2005 (gmt 0)

10+ Year Member



What I am trying to figure out is how to know whether the user has chosen something from the descript_" + vid + " dropdown box below? I need to only add
+ ' ' + comSignature
to document.forms[0].elements['linerTextAndDescriptionAdj_" + vid + "'].value
if someone has chosen something from the Description dropdown. So if the dropdown box still says
-- choose description --
don't add
+ ' ' + comSignature
-----------------------------
oNewTd13.innerHTML = "<select class=copy style='background-color: #FFFFFF' onchange=\"document.forms[0].elements['linerTextAndDescriptionAdj_" + vid + "'].value = linerText + ' ' + this.options[this.selectedIndex].innerHTML + ' ' + comSignature; document.forms[0].elements['DescriptionAdj_" + vid + "'].value = this.options[this.selectedIndex].innerHTML;\" name=descript_" + vid + "><option value=''>-- choose description --</option>" + descriptionAdjOptions + "</select>";
oNewTd13.innerHTML += "<input type=hidden name=linerTextAndDescriptionAdj_" + vid + " value=''>";
oNewTd13.innerHTML += "<input type=hidden name=DescriptionAdj_" + vid + " value=''>";

Things work with the onchange= but how do I know if the user doesn't choose anything from the dropdown choices and to not include + ' ' + comSignature if they don't choose anything?

document.forms[0].elements['DescriptionAdj_" + vid + "'].value is populated with the Description choice.

muneepenee

9:51 pm on Oct 13, 2005 (gmt 0)



1. if yuzer dont select sumthang in the drop-box, it dont chaenj, so yu need tu put it inside a form with a klik-box such as a submit.
1. tu get selected...
num1 =document.inputf.dropboxname.selectedIndex;
weer form name="inputf"
& drop box name="dropboxname"
if num1<1, nuthang selected