[CLOSED] Question about directmethod (another one)

  1. #1

    [CLOSED] Question about directmethod (another one)

    Hello

    Is it possible to have a directmethod returning a value from the code behind to the javascript call?

    I want to have a textarea updated by a database but I want to achive that with a directmethod.
    Last edited by Daniil; Jun 14, 2012 at 11:21 AM. Reason: [CLOSED]
  2. #2
    Yes, it is possible, just read result in success handler, see examples in
    http://examples2.ext.net/#/Events/Di...hods/Overview/
    Vladimir Shcheglov
    Sr. Developer
  3. #3
    Hello

    It did the tricks here the solution:

    In VB code behind

       <DirectMethod(ShowMask:=True, SuccessFn:="RefreshCommentJS")> Public Function RefreshComment(ByVal ChartToDraw As String) As String
     
            Return ChartToDraw
    
        End Function
    Client side:

    var RefreshCommentJS = function ( result )
    {
        Ext.Msg.alert( 'Return:', result );
    };

Similar Threads

  1. [CLOSED] DirectMethod's problem
    By softmachine2011 in forum 2.x Premium Help
    Replies: 1
    Last Post: Jun 06, 2012, 3:56 PM
  2. Replies: 1
    Last Post: Sep 13, 2011, 5:19 PM
  3. [CLOSED] directmethod and onload
    By Pablo_Azevedo in forum 1.x Premium Help
    Replies: 1
    Last Post: Jun 21, 2011, 12:08 PM
  4. [CLOSED] MultiCombo and DirectMethod
    By craig2005 in forum 1.x Premium Help
    Replies: 3
    Last Post: Mar 31, 2011, 1:30 PM
  5. Replies: 1
    Last Post: Mar 01, 2011, 11:37 AM

Posting Permissions