bobbybrown69
Programmer
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.
+ ' ' + 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.