This is a migrated thread and some comments may be shown as answers.

Any idea why this ajax.js error happens when I trying to assign something to NumericTextBox.ID?

2 Answers 29 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
matt
Top achievements
Rank 1
matt asked on 24 Sep 2010, 07:30 PM

 

 

The page worked fine by itself.. But once I made it a .ascx that is part of a .aspx that is part of a master page I get the error below (when I uncomment that line)..

that radscriptmanager is there in the masterpage

 

<

 

 

telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnablePartialRendering="True"

 

 

 

 

 

 

 

EnableScriptCombine="False" CompositeScript-ScriptMode="Auto" ScriptMode="Auto"

 

 

 

 

 

 

 

AsyncPostBackTimeout="360000">

 

 

 

 

 

 

 

<Scripts>

 

 

 

 

 

 

 

<asp:ScriptReference Path="~/Shared/script/AjaxLibrary/MicrosoftAjax.js" />

 

 

 

 

 

 

 

<asp:ScriptReference Path="~/Shared/script/AjaxLibrary/MicrosoftAjaxCore.js" />

 

 

 

 

 

 

 

<asp:ScriptReference Path="~/Shared/script/jPrototypes.js" />

 

 

 

 

 

 

 

</Scripts>

 

 

 

 

 

 

 

<CdnSettings TelerikCdn="Disabled" />

 

 

 

 

 

 

 

</telerik:RadScriptManager>

 

 

 

 


but I get this error below.. any ideas? (I should be able to work aroud it but just wondering what is so special about assigning a value to the NumericTextBox.ID)


Microsoft JScript runtime error: 'undefined' is null or not an object

 

{

 

var a=this;b.UI.Control.initializeBase(a);a._element=c;c.control=a;var d=a.get_role();d&&c.setAttribute("role",d)}

 

 

 




////Current Amount Hope6

 

 

TableCell tcCurrentAmountHope6 = new TableCell();

 

 

 

RadNumericTextBox tbCurrentAmountHope6 = new RadNumericTextBox();

 

tbCurrentAmountHope6.Type =

 

NumericType.Currency;

 

 

 

//tbCurrentAmountHope6.ID = "tbCurrentAmountHope6" + level1.Level1 + cc.ftaskId;

 

tbCurrentAmountHope6.Attributes[

 

"TaskId"] = cc.ftaskId.ToString();

 

tbCurrentAmountHope6.Attributes[

 

"FundType"] = "H6";

 

tbCurrentAmountHope6.Text = cc.H6ExpCQ.ToString();

tbCurrentAmountHope6.Visible = cc.H6Uses.ToString() ==

 

"0.00" ? false : true;

 

tcCurrentAmountHope6.Controls.Add(tbCurrentAmountHope6);

trItem3.Controls.Add(tcCurrentAmountHope6);

2 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 27 Sep 2010, 02:02 PM
Hello matt,

Can you please verify that the id you assign for the numeric textbox with this line of code:
//tbCurrentAmountHope6.ID = "tbCurrentAmountHope6" + level1.Level1 + cc.ftaskId;

does not contain special characters like dashes, brackets, etc.? If so, you need to escape or strip them in order to make sure that the client functionality of the control will work properly (which internal mechanism relies on the id of the client numeric textbox object). Let me know what your findings are.

Best regards,
Sebastian
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
matt
Top achievements
Rank 1
answered on 27 Sep 2010, 07:55 PM
tbCurrentAmountHope6Construction Costs273

There is a space.. so you got it!

Tags
General Discussions
Asked by
matt
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
matt
Top achievements
Rank 1
Share this question
or