I have created the simplest form I can to test setting a RadTextBox using javascript.
aspx:
VB:
I get the following error:
Microsoft JScript runtime error: Unable to get value of the property 'set_value': object is null or undefined
Yes I have to do it on page load.
Yes I have to do this using javascript.
aspx:
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
>Textbox Page Load Testing</
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
asp:ScriptManager
runat
=
"server"
ID
=
"SCRM"
>
</
asp:ScriptManager
>
<
telerik:RadFormDecorator
ID
=
"RadFormDecorator1"
runat
=
"server"
DecoratedControls
=
"All"
EnableRoundedCorners
=
"True"
/>
<
div
>
<
telerik:RadTextBox
ID
=
"txtTest"
runat
=
"server"
Skin
=
""
TextMode
=
"SingleLine"
>
</
telerik:RadTextBox
>
</
div
>
<
telerik:RadCodeBlock
runat
=
"server"
ID
=
"RadScriptBlock1"
>
<
script
type
=
"text/javascript"
>
function setVal(val) {
$find("<%=txtTest.ClientID %>").set_value(val);
}
</
script
>
</
telerik:RadCodeBlock
>
</
form
>
</
body
>
</
html
>
VB:
Partial Class Default4
Inherits System.Web.UI.Page
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
ClientScript.RegisterStartupScript(Me.GetType(), "Pass", "setVal('TestValue');", True)
End Sub
End Class
I get the following error:
Microsoft JScript runtime error: Unable to get value of the property 'set_value': object is null or undefined
Yes I have to do it on page load.
Yes I have to do this using javascript.