Results 1 to 4 of 4

Thread: [CLOSED]BasicForm submit hangs at WaitMsg; same Code worked with older ExtJS versions

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext User
    Join Date
    Aug 2009
    Posts
    2
    Vote Rating
    0
      0  

    Default [CLOSED]BasicForm submit hangs at WaitMsg; same Code worked with older ExtJS versions

    Ext version tested:

    • Ext 3.2.1



    Adapter used:

    • ext



    css used:

    • only default ext-all.css





    Browser versions tested against:

    • FF3 (firebug 1.3.0.10 installed)
    • Chrome



    Operating System:

    • Win Vista



    Description:
    Hi,



    I'm having the following code that worked a 100% when using it with older ExtJS version:

    - With 2.2.1 it definitly worked

    - With 3.0 I'm not quite sure



    Code:
    Ext.addFriendWindow = new Ext.Window({
    
            applyTo     : 'request-win',
    
            layout      : 'fit',
    
            width       : 330,
    
            height      : 220,
    
            closeAction :'hide',
    
            plain       : true,
    
            items       : new Ext.Panel({
    
                applyTo        : 'request-panel',
    
                deferredRender : false,
    
                border         : false
    
            }),
    
    
    
            buttons: [{
    
                text     : 'Join Place',
    
                handler  : function(){
    
                    Ext.addFriendWindow.hide();
    
    
    
                    var form = document.createElement('form');
    
                    form.setAttribute('method', 'POST'); // needed for IE
    
                    document.body.appendChild(form);
    
    
    
                    var message = document.getElementById('messageTextarea').value;
    
    
    
                    var basicForm = new Ext.form.BasicForm(form, {
    
                        url: 'json/place_invitations.php'
    
                    });
    
    
    
                    basicForm.submit({
    
                        params:{
    
                            email: email, 
    
                            post: 'place_request',
    
                            email_hash: email_hash,
    
                            pid: placeId,
    
                            message: message
    
                        },
    
                        success: function() {
    
                            ...
    
                            document.body.removeChild(form);
    
                        },
    
                        failure: function() { Ext.Msg.alert('Error', 'Could 
    not make Place Confirmation Request.'); 
    document.body.removeChild(form);},
    
                        waitMsg: 'Saving Place Confirmation Request...'
    
                    });
    
                }
    
            },{
    
                text     : 'Close',
    
                handler  : function(){
    
                    Ext.addFriendWindow.hide();
    
                }
    
            }]
    
        });
    
        Ext.addFriendWindow.show();
    Now, the whole things hangs at the waitMessage.

    And the URL is NEVER called via XHR/Ajax: 'json/place_invitations.php'



    Thx for any help. I posted this in the bug section, since I've not
    changed a single within this code AND when migrating to 3.2.1 this code
    suddenly didn't work anymore..



    Best regards,

    Tim

    Debugging already done:

    • none



    Possible fix:

    • not provided

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    119
      0  

    Default

    Please follow the bug posting guidelines.

    Notes:
    1. Why are you even creating a <form> element? Why not simply use Ext.Ajax.request?
    2. You can't use renderTo or applyTo inside a layout. You could use 'el' instead, but I wouldn't recommend this method.

  3. #3
    Ext User
    Join Date
    Aug 2009
    Posts
    2
    Vote Rating
    0
      0  

    Default

    ad 1) changed successfully to Ext.Ajax.request. Now it works. Thx.. (this approach certainly makes more sense..)
    ad 2) but applyTo works in my case. What are the flaws/restrictions/problems if I continue to use it. What other alternatives are there (besides el, that you don't recommend)?

    Thanks in anyway for your help.
    Tim

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    119
      0  

    Default

    When you use 'applyTo' it will first render the panel to the 'request-panel' and then move it to the layout.
    Using 'el' it will first move the 'request-panel' element to the layout and then render the panel.

    Both methods will work, but on slow browsers the second one looks better.

    What does 'request-panel' contain? If it only contains Ext components then you shouldn't be using renderTo/applyTo/el at all, but use items instead.

Similar Threads

  1. Submit on enter waitMsg
    By Artistan in forum Ext 3.x: User Extensions and Plugins
    Replies: 0
    Last Post: 15 Oct 2009, 8:44 AM
  2. Possible name clash with older versions of ExtJS
    By walkerr in forum Community Discussion
    Replies: 3
    Last Post: 25 Jun 2008, 9:09 AM
  3. Form submit: fails or hangs
    By mike1993 in forum Ext 1.x: Help & Discussion
    Replies: 12
    Last Post: 5 Oct 2007, 2:31 PM
  4. Safari (older versions) fixes.
    By Alan Knowles in forum Ext 1.x: Bugs
    Replies: 0
    Last Post: 25 Apr 2007, 8:31 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
  •