-
9 Aug 2010 5:55 AM #1
[CLOSED]BasicForm submit hangs at WaitMsg; same Code worked with older ExtJS versions
[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
Now, the whole things hangs at the waitMessage.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();
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
-
9 Aug 2010 7:14 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
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.
-
9 Aug 2010 7:55 AM #3
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
-
9 Aug 2010 8:07 AM #4Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
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.
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
Submit on enter waitMsg
By Artistan in forum Ext 3.x: User Extensions and PluginsReplies: 0Last Post: 15 Oct 2009, 8:44 AM -
Possible name clash with older versions of ExtJS
By walkerr in forum Community DiscussionReplies: 3Last Post: 25 Jun 2008, 9:09 AM -
Form submit: fails or hangs
By mike1993 in forum Ext 1.x: Help & DiscussionReplies: 12Last Post: 5 Oct 2007, 2:31 PM -
Safari (older versions) fixes.
By Alan Knowles in forum Ext 1.x: BugsReplies: 0Last Post: 25 Apr 2007, 8:31 PM


Reply With Quote