470,849 Members | 1,116 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,849 developers. It's quick & easy.

validation control status?

js
Hi, I have a text box and DropDownList control and a validation control,

When user entering a number in the text box, based on the entered number,
the dropdrownlist value will change
(document.getElementById('dnn_ctr-1_Register_ddReferral').value =
document.getElementById("dnn_ctr-1_Register_txtReferral").value;) and the
validation control will valify the dropdownlist if it's empty.

I found there is a problem the server side Page.IsValid will always return
false and ?ddReferral.selectValue is empty. But it works fine if I manually
pick a item from the dropdownlist.

What's the problem, do I need to chagne some value status after I use
javascript to assign value to the dropdrownlist control? Please help. Many
thanks.

Apr 27 '06 #1
1 1206
js wrote:
Hi, I have a text box and DropDownList control and a validation control,

When user entering a number in the text box, based on the entered number,
the dropdrownlist value will change
(document.getElementById('dnn_ctr-1_Register_ddReferral').value =
document.getElementById("dnn_ctr-1_Register_txtReferral").value;) and the
validation control will valify the dropdownlist if it's empty.

I found there is a problem the server side Page.IsValid will always return
false and ?ddReferral.selectValue is empty. But it works fine if I manually
pick a item from the dropdownlist.

What's the problem, do I need to chagne some value status after I use
javascript to assign value to the dropdrownlist control? Please help. Many
thanks.


You can't assign a value to a dropdownlist. You have to set the
selectedIndex property to select one of the items.
Apr 28 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Rik | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.