RadToolTipManager + AjaxUpdate + jQuery

8 posts, 0 answers
  1. Alan T
    Alan T avatar
    125 posts
    Member since:
    Apr 2010

    Posted 20 Jan 2012 Link to this post

    Hi, i've got a image map. That i've got a radtooltipmanager attached to. All works well - i've got an ajaxupdate that fires retrieves some information from the database on area on the imagemap, and displays it in the tooltip.

    However, the issue being is that after the ajaxupdate has completed, i have some jquery on the page which seems to stop working.
    Previously when i've had issues with ajax requests and cancelling jquery / javascript i've added the control that contains the jquery into the radajaxmanager of the control that's caused the ajax request. I've tried this with adding the radtooltipmanager into the radajaxmanager, and adding the panel tha contains my jquery stuff into the updatedcontrols.

    This panel contains the necessary javascript enclosed in a radscriptblock, including a link to the jquery external file. (it doesnt however include the jquery ui which i think this piece of jquery uses.)

    Any suggestions ?
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 23 Jan 2012 Link to this post

    Hello Alan,

    I do not believe disposing and reloading your scripts is really necessary here. Only if you are attempting to override the jQuery library that comes with our controls you should add the link to it after the controls.

    This seems more like a JavaScript error to me. Please examine your browser's console and see what it is. If it is coming from the RadControls on the page please post it here so we can see what is going on. Once it is resolved I hope there will be no further issues.


    Kind regards,
    Marin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Alan T
    Alan T avatar
    125 posts
    Member since:
    Apr 2010

    Posted 23 Jan 2012 Link to this post

    Hi Marin, thanks for the response.

    No there is no javascript error.

    To give you a bit more insight, i'm using this jquery thing called 'manifest' - a string tokenizor. (Which i think would be a good addition to the radinput controls)

    http://justinstayton.com/jquery-manifest/example1.html

    However, after the ajax postback on the imagemap, the element is no longer styled and the jquery no longer works.
  5. Alan T
    Alan T avatar
    125 posts
    Member since:
    Apr 2010

    Posted 23 Jan 2012 Link to this post

    it appears, that its not re-running the jquery function after the postback, hence why its no longer working.
  6. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 24 Jan 2012 Link to this post

    Hi Alan,

    I am not sure how an input script is related to an image map, yet if simply running the script is needed I suggest you hook to the OnClientResponseEnd event and call it manually at this point.


    Regards,
    Marin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  7. Alan T
    Alan T avatar
    125 posts
    Member since:
    Apr 2010

    Posted 25 Jan 2012 Link to this post

    Marin,

    that appears to have done the trick! i hooked it up to the OnClientResponseEnd property of my radajaxmanager and success.

    Many thanks,


    Alan
  8. Alan T
    Alan T avatar
    125 posts
    Member since:
    Apr 2010

    Posted 02 Feb 2012 Link to this post

    Following on from this, i wonder; is there a way to cancel an ajax request client side? basically i want my imagemap to be clickable as well. but i'm finding that if they're clickable and i've got an ajaxrequest attached to the radtooltip the page can start redirecting mid request and throws an error. 
  9. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 03 Feb 2012 Link to this post

    Hi Alan,

    You can use the PageRequestManager to cancel AJAX requests, as this is the way AJAX works, for example:
    var prm = Sys.WebForms.PageRequestManager.getInstance(); 
    prm.abortPostBack();

    More information on this method is available from MSDN: http://msdn.microsoft.com/en-us/library/bb397526.aspx.

    Greetings,
    Marin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017