Results 1 to 2 of 2

Thread: Error Dialog with Detail link

  1. #1

    Default Error Dialog with Detail link

    I want a dialog box with a link 'show' that will trigger perhaps an extjs function so I could manipulate the div to present the detail and change the link to 'hide' and do the opposite on click.

    I am thinking of directly putting the div in the msg property of the dialog box.

    Please help point me to the right direction, thanks.

    Code:
          Ext.Msg.show({
                icon : Ext.MessageBox.ERROR,
                buttons : Ext.Msg.OK,
                title : 'Request Error',
                msg : respObj.errorDescShort + '<br><br><a href="somefunction()" class"dialoglink">Show Detail</a>'
              });

  2. #2

    Default solved

    something must be wrong in how i asked. I got 2 views only in 1 hour~

    Code:
        doStandardError : function(respObj) {
          Ext.Msg.show({
                icon : Ext.MessageBox.ERROR,
                buttons : Ext.Msg.OK,
                title : 'Request Error',
                autoHeight : true,
                autoWidth : true,
                msg : respObj.errorDescShort
                    + '<br><br><div id="errorSection"><a id="errorLink">Show Detail<a><div id="errorDetail"/></div>'
              });
    
          Ext.EventManager.on(Ext.get('errorLink'), 'click', function() {
                if (Ext.get('errorLink').dom.innerHTML == 'Show Detail') {
                  Ext.get('errorLink').dom.innerHTML = 'Hide Detail';
                  Ext.get('errorDetail').update(respObj.errorDescLong);
                } else {
                  Ext.get('errorLink').dom.innerHTML = 'Show Detail';
                  Ext.get('errorDetail').update('');
                }
              });

Similar Threads

  1. Handling Master-Detail-Detail displays with back button support
    By robertj98 in forum Sencha Touch 1.x: Discussion
    Replies: 5
    Last Post: 15 Jul 2010, 12:59 AM
  2. message box/dialog via Ajax-- grid detail
    By blackwaterdev in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 15 Aug 2007, 1:22 AM
  3. [Solved] Link Instead of Button for Dialog?
    By cluettr in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 4 Jul 2007, 6:29 PM
  4. Detail link with id, from grid
    By brondsem in forum Community Discussion
    Replies: 4
    Last Post: 2 Apr 2007, 1:58 AM
  5. dialog on multiple link
    By comicway in forum Ext 1.x: Help & Discussion
    Replies: 32
    Last Post: 28 Jan 2007, 10:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •