Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha Premium Member
    Join Date
    Jul 2010
    Posts
    18
    Vote Rating
    0
    dracofyre is on a distinguished road

      0  

    Default Update Ext.MessageBox message from ServerSide response

    Update Ext.MessageBox message from ServerSide response


    I'm faced with a problem where our customer wants the message of the MessageBox to change based upon some state that is tracked on the server. I know I could send up this state to the panel and just switch off the state when the button is pressed. My issue with doing that is that I'm writing custom code in the javascript that tracks the state and understands which message to display when the button is pressed. I'm looking for a solution or hint on how to make the message of the MessageBox change based upon the server providing the message information.

    These are some ideas I have put together. Let me know if I'm on the right track.
    • On the Click of the button, make a Ajax request to the server for the message, on callback display the message in the messagebox.
      • I've done this approach before but this approach feels clunky to me.
    • Use the Ext.Updater to update the body message. I've never used this approach and I'm unfamiliar with it. So I'm curious if this is the correct approach to doing it. I've also seen the loadScripts property and I'm wondering how it could be used.
    So to summarize: I have a button that needs to launch a confirmation dialog. The confirmation message needs to be different depending upon some state in the server. What I'm looking for is some guidance on how to resolve this problem and also hoping to find a pattern that I could use elsewhere in my customer's application.

    Thanks for any help provided.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,519
    Vote Rating
    814
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    What's wrong with

    Code:
    Ext.Ajax.request({
        //...
        success : function(response) {
            var text = response.responseText;
    
            Ext.Msg.alert('Something', text);
        }
    });
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha Premium Member
    Join Date
    Jul 2010
    Posts
    18
    Vote Rating
    0
    dracofyre is on a distinguished road

      0  

    Default


    There is nothing with that approach. In fact I've used that approach alot. I just was looking to see if others have a more elegant approach. I'm always looking to see if others have another approach to a solution.

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,519
    Vote Rating
    814
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    I see. Yeah, it's what I always have done.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

Tags for this Thread