javascript is case sensitive you need to get it right
you options are:
document.Analysis_UserEnt.txtUserValue.value = valueData;
document.forms['Analysis_UserEnt'].txtUserValue.value = valueData;
document.getElementById('txtUserValue').value = valueData;
there is no .Text or .text property for an input box.
as the value of a text box is an attribute,
document.getElementById('txtUserValue').innerText
document.getElementById('txtUserValue').innerHTML
will return "", no matter what the value is.
-- bruce (sqlwork.com)
"Robert Storrs" <ro***********@intellinex.com> wrote in message
news:0c****************************@phx.gbl...
I need to set the value of a asp text box in javascript.
<asp:TextBox id="txtUserValue" runat="server"test</asp:TextBox>
I have tied:
function setValue(valueData) {
alert(valueData);
document.Analysis_UserEnt.txtUserValue.Value = valueData;
document.Analysis_UserEnt.txtUserValue.Text = valueData;
document.Analysis_UserEnt.txtUserValue.InnerText =
valueData;
None of these work. Any suggestions? The function
setValue is being called by a child page. This works as I
have used alert statements to track progress.
Analysis_UserEnt is the asp form id
Bob Storrs