E
Eric
I have a drop down list with an associated label. I want to take the
selectedValue of the list and populate the text of the label when the value
in the list is changed. I havent figured out how to access the controls
through the script, however.
Here's what I have:
In the ASPX file:
<script>
function OnSelectedIndexChanged()
{window.document.Form1.lblLogIDDate.Text =
window.document.Form1.ddlLogID.SelectedValue;}
</script>
with the following in the Page_Load function:
Me.ddlLogID.Attributes.Add("onchange", "OnSelectedIndexChanged();")
I know the handler fires, but I keep getting errors when it does.
Variations on "xxx" is null or not a valid object. In the above example it
would be ""window.document.Form1.ddlLogIDDate" is null or not a valid
object"
I've tried window.document.Forms(0).ddlLogIDDate,
window.document.Form1("lblLogIDDate"), and other variations but cant find
the right combo.
Can anyone help?
selectedValue of the list and populate the text of the label when the value
in the list is changed. I havent figured out how to access the controls
through the script, however.
Here's what I have:
In the ASPX file:
<script>
function OnSelectedIndexChanged()
{window.document.Form1.lblLogIDDate.Text =
window.document.Form1.ddlLogID.SelectedValue;}
</script>
with the following in the Page_Load function:
Me.ddlLogID.Attributes.Add("onchange", "OnSelectedIndexChanged();")
I know the handler fires, but I keep getting errors when it does.
Variations on "xxx" is null or not a valid object. In the above example it
would be ""window.document.Form1.ddlLogIDDate" is null or not a valid
object"
I've tried window.document.Forms(0).ddlLogIDDate,
window.document.Form1("lblLogIDDate"), and other variations but cant find
the right combo.
Can anyone help?