DustpanDave
Programmer
Hi All.
I have a ComboBox that has, say, 5 items in it. These display as text in the Combo box but are stored as integers in the DB.
How do i get the Text value rather than the ID value of this selected item in the combo box?
I am trying to display and hide a certain text box when a certain item in the combo box is selected.
i beleive it has something to do with options.value part?
MY CODE SO FAR:
function HideTitleONChange(evt)
{
var ctlState = document.getElementById("ProfCrdTitleID");
var ctlOtherTitle = document.getElementById("Title");
if ( ctlState.options.value == "2"){
ctlOtherTitle.style.visibility = "visible";
ctlOtherTitle.style.value =="";}
else{
ctlOtherTitle.style.visibility = "hidden";
ctlOtherTitle.style.value =="";}
return true;
}
var ctlState = document.getElementById("ProfCrdTitleID");
addEvent(ctlState, "change", HideTitleONChange);
Thanks Dave
I have a ComboBox that has, say, 5 items in it. These display as text in the Combo box but are stored as integers in the DB.
How do i get the Text value rather than the ID value of this selected item in the combo box?
I am trying to display and hide a certain text box when a certain item in the combo box is selected.
i beleive it has something to do with options.value part?
MY CODE SO FAR:
function HideTitleONChange(evt)
{
var ctlState = document.getElementById("ProfCrdTitleID");
var ctlOtherTitle = document.getElementById("Title");
if ( ctlState.options.value == "2"){
ctlOtherTitle.style.visibility = "visible";
ctlOtherTitle.style.value =="";}
else{
ctlOtherTitle.style.visibility = "hidden";
ctlOtherTitle.style.value =="";}
return true;
}
var ctlState = document.getElementById("ProfCrdTitleID");
addEvent(ctlState, "change", HideTitleONChange);
Thanks Dave