Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Window > RadConfirm implementation in External js file

Not answered RadConfirm implementation in External js file

Feed from this thread
  • A2H avatar

    Posted on Feb 1, 2012 (permalink)

    Hi,

    I have a webpage in which javascript functionality was embedded in external js file.
    Currently in external js file we have used ordinary confirm and i want to replace this with radconfirm.

    I have used radconfirm on button click, where we have return false also with that. and then in javascript callback  we do a post back using 
    "__dopostback() fuction.

    I dont know how can i use this in external js file.

    Current Scenario :
    I am able to see radconfirm,but the execution is not stopping when we click on cancel.

    Please help me.

    Thanks,
    A2H

    Reply

  • Marin Bratanov Marin Bratanov admin's avatar

    Posted on Feb 3, 2012 (permalink)

    Hello,

    Please examine this demo: http://demos.telerik.com/aspnet-ajax/window/examples/confirmserverclicks/defaultcs.aspx. You can see how it relies on passing a reference to the clicked button to its OnClientClicked handler so that it does not depend on the page's context. You can use this approach to externalize the confirmations. I also advise that you make sure you cancel the postback in the string that defines click handler itself, as returning false later in the JavaScript function may happen too late and thus - not work. The demo's description provides information on the logic of the approach, its peculiarities and limitations.


    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

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Window > RadConfirm implementation in External js file
Related resources for "RadConfirm implementation in External js file"

ASP.NET Window Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  |  Step-by-step Tutorial  ]