Results 1 to 6 of 6

Thread: How to display Form Panel on Button click of the Ext.window

  1. #1

    Default How to display Form Panel on Button click of the Ext.window

    Hi All,

    Good afternoon. i am very new to this extjs and i am seeking ur help.

    I have a window (poup ext window) with preview button.once the user click on preview button he has to see a another pop up with data entered in the first ext.window.

    Code:
    
    
    function showAdvancedSearchDialog(htmlData) { var window = new Ext.Window({ title: "E-Form Template Creation", width:650, autoHeight: true, html: htmlData, y: 150, listeners: { beforeclose: function () { searchVisible = false; } }, buttons: [ { text: 'Preview', handler: function() { displayPreview(); } }, { text:'Save', handler: function() { window.close(); } } ] }); window.show(this);
    }
    and the second window code is like this.

    Code:
    function
    displayPreview() { var id =$("#eform_id").val(); alert("E-Form_ID-->"+id); data = "eform_id=" + id; alert(data); $.ajax( { type : "GET", url : "/ajax/eform/Preview.do", data : data, cache : false, dataType : "text/html", timeout: 20000, beforeSend : function() { showWaitingDialog("Please wait..."); }, error: function (xhr, err) { resolveAjaxError(xhr, err); }, success : function(data) { showEformDialog(data); } }); } function showEformDialog(htmlData) { alert("In the Preview Dialog"); var preview = new Ext.Window({ title: "E-Form Preview", width:650, autoHeight: true, html: htmlData, y: 150, listeners: { beforeclose: function () { searchVisible = false; } }, buttons: [ { text: 'Close', handler: function() { preview.close(); } } ] }); preview.show(this); } });
    I tried but the second window(preview) is not appearing . please help me in this.

    Thanks in advance.

    Regards,
    Sathya

  2. #2
    Ext JS Premium Member
    Join Date
    Jun 2009
    Location
    Switzerland
    Posts
    83

    Default

    Does your Ajax request successfully finish? Is showEformDialog called?
    Talk to me on Twitter @patmatsumura

  3. #3

    Default

    No, it is showing ajax error. is this the correct procedure to follow. please help me. please provide me the sample examples ..thanks in advance

  4. #4
    Ext JS Premium Member
    Join Date
    Jun 2009
    Location
    Switzerland
    Posts
    83

    Default

    If your Ajax request never finishes successfully, then showEFormDialog will never be called.
    Talk to me on Twitter @patmatsumura

  5. #5

    Default

    Quote Originally Posted by pmatsumura View Post
    If your Ajax request never finishes successfully, then showEFormDialog will never be called.

    Thanks Pmatsumura .

  6. #6
    Sencha User
    Join Date
    Jun 2017
    Posts
    1

    Default

    [Hi guys Im new to extjs. I want to know how to display or hide forms panels on button click event?
    Thanks in advance

Similar Threads

  1. Create form in a panel by click on a button
    By daniferi in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 20 Feb 2011, 6:52 AM
  2. TreeGrid - right button click, no display menu
    By nickylee in forum Ext GWT: Discussion
    Replies: 4
    Last Post: 8 Feb 2011, 2:56 AM
  3. Replies: 1
    Last Post: 25 May 2008, 4:10 PM
  4. Replies: 4
    Last Post: 12 Dec 2007, 6:20 PM

Posting Permissions

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