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

Jquery won't fire on a RadAjaxManager page

3 Answers 122 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
TIOS
Top achievements
Rank 1
TIOS asked on 11 Aug 2010, 02:40 PM
I have a code with a radajaxmanager on when enableajax="false" the jquery works a dream, but when I set it to true it doenst work.....  even if I put an alert('hello'); in at the first line it doesnt call it... any ideas:

Code reassables along the lines of:

<telerik:RadAjaxManager ID="ram" runat="server" DefaultLoadingPanelID="ralp" EnableAJAX="TRUE">
    <AjaxSettings>

<asp:MultiView ID="mv" runat="server" ActiveViewIndex="0">
<asp:View ID="viewHorseDetails" runat="server">
        <asp:Repeater ID="rptHorseDetails" runat="server">
            <ItemTemplate>
                        <li>
                            <label>
                                Remarks/Description<br />(Up to 100 words)</label>
                            <asp:TextBox ID="txtRemarks" runat="server" TextMode="MultiLine" Columns="40" Rows="8" CssClass="text"
                                Text="" ValidationGroup="HorseDetails" /><br />(this textbox accepts 100 characters)
                            <span id="spn" runat="server"></span><br />
                        </li>
                            <telerik:RadScriptBlock ID="rsbDesc" runat="server">
                                <script type="text/javascript">
                                    $(function () {
                                        /*alert('bleh');*/
                                        var limit = 10;
                                        var tb = $('textarea[id$=txtRemarks]');
                                        $(tb).keyup(function () {
                                            var len = $(this).val().length;
                                            if (len > limit) {
                                                //this.value = this.value.substring(0, 50);
                                                $(this).addClass('exceeded');
                                                $('#spn').text(len - limit + " characters exceeded");
                                            }
                                            else {
                                                $(this).removeClass('exceeded');
                                                $('#spn').text(limit - len + " characters left");
                                            }
                                        });

                                        $('input[id$=btnFinal]').click(function (e) {
                                            var len = $(tb).val().length;
                                            if (len > limit) {
                                                e.preventDefault();
                                            }
                                        });
                                    });
                                </script>
                            </telerik:RadScriptBlock>
                        <fieldset class="submit">
                            <asp:Button ID="btnNextHorse" runat="server" Text="Next Horse" CssClass="submit" CommandName="NextHorse" ValidationGroup="HorseDetails" />&nbsp;<asp:Button ID="btnFinal" CssClass="submit" runat="server" Text="This is the last horse I am entering" CommandName="FinalHorse" ValidationGroup="HorseDetails" />
                        </fieldset>

            </ItemTemplate>
        </asp:Repeater>
    </asp:View>   
</asp:MultiView>

Any ideas?

Thanks,
Chris

3 Answers, 1 is accepted

Sort by
0
TIOS
Top achievements
Rank 1
answered on 13 Aug 2010, 11:20 AM
Anybody?
0
Maria Ilieva
Telerik team
answered on 13 Aug 2010, 12:10 PM
Hi Chris Bond,

I would suggest you to refer to the following help topic which elaborates on executing java script after ajax request. Test the provided approach and let me know if it works for you.

All the best,
Maria Ilieva
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
TIOS
Top achievements
Rank 1
answered on 13 Aug 2010, 01:20 PM
Thanks worked a dream doh I use responsescripts elsewhere just didnt click when coding it!
Tags
General Discussions
Asked by
TIOS
Top achievements
Rank 1
Answers by
TIOS
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or