I wrote some javascript fns in usercontrol.In aspx page I added radajaxmanager and this usercontrol.then the javascript fn is not recognizing.When i remove the radajaxmanager,its working.The radajaxmanager in my page is necessary too..
Any way to solve this prbm
Plz help me..
thanks
3 Answers, 1 is accepted
Please wrap the script into RadScriptBlock control and verify if the scripts will be properly registered.
RadScriptBlock is used where you have JavaScript that evaluates after an AJAX request.RadScriptBlock wraps JavaScript where the JavaScript is located in an updating area.
Test this approach and let us know if this helps.
Best wishes,
Maria Ilieva
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
it is within the RadScriptBlock itself and was working.
The problem is,
When I added telerik:RadAjaxManager,it is not working
plz help
Thanks
the ascx code is
<
telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
<script type="text/javascript" language="javascript">
function SetTextColor (colorPicker, eventArgs)
{
var textContainer = $get("textContent");
textContainer.style.color = (eventArgs.get_color) ? eventArgs.get_color() : colorPicker.get_selectedColor();
}
function SetBckgColor (colorPicker, eventArgs)
{
var textContainer = $get("textContent");
textContainer.style.backgroundColor = (eventArgs.get_color) ? eventArgs.get_color() : colorPicker.get_selectedColor();
}
</script>
</telerik:RadScriptBlock>
<tr><td style="height: 34px">
Text color:<telerik:RadColorPicker runat="server" ID="RadColorPickerForecolor" OnClientColorChange="SetTextColor"
OnClientColorSelecting="SetTextColor" ShowIcon="true" Preset="Standard" ShowEmptyColor="false"
SelectedColor="#000000" />
</td></tr>
<tr><td style="height: 41px">
Background color:<telerik:RadColorPicker runat="server" ID="RadColorPickerBackcolor" OnClientColorChange="SetBckgColor" Preset="Standard"
OnClientColorSelecting="SetBckgColor" ShowIcon="true" ShowEmptyColor="false" SelectedColor="#FFFFFF"> </telerik:RadColorPicker>
</td></tr>
in aspx page
<%@ Register TagPrefix="uc1" TagName="UserNotes" Src="UserNotes.ascx" %>
<
telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="lnkAll">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="WorkDetailsGrid" LoadingPanelID="LoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<
telerik:RadGrid ID="WorkDetailsGrid" runat="server" AllowPaging="True" AllowSorting="True"
GridLines="Vertical" Skin="Vista" AutoGenerateColumns="False" CssClass="gridnew">
-----
----
<uc1:UserNotes ID="ucUsernotes" runat="server" Visible="false" />
</
telerik:RadGrid>
Thanks