-
15 Nov 2012 3:11 AM #1
Timeout is ignored if form is submitted with DirectSubmit
Timeout is ignored if form is submitted with DirectSubmit
REQUIRED INFORMATION Ext version tested:
- Ext 4.1.3
- FF
- html
- If a form is submitted with DirectSubmit and a timeout is set for the form, the timeout is ignored and defaults to 30 seconds.
I have tested the following code and inspected the requests with firebug, and after 30 seconds the request is aborted (and another one is sent). If submit method is changed to the URL in the config, "submitted" is returned after the server script is finished.
- see code below
- submitted
- timeout
Code:Ext.require([ '*' ]); Ext.onReady(function() { Ext.app.REMOTING_API = { "url" : "save-form.php", "type" : "remoting", "actions" : { "MyForm" : [ { "name" : "onSubmit", "len" : 1, "formHandler" : true } ] } }; Ext.Direct.addProvider(Ext.app.REMOTING_API); var bd = Ext.getBody(); var simple = Ext.widget({ xtype: 'form', layout: 'form', api: { submit: MyForm.onSubmit }, //url: 'save-form.php', timeout: 1000000, frame: true, bodyPadding: '5 5 0', width: 350, fieldDefaults: { msgTarget: 'side', labelWidth: 75 }, defaultType: 'textfield', items: [{ fieldLabel: 'Name', name: 'first' }], buttons: [{ text: 'Save', handler: function() { this.up('form').getForm().submit(); } }] }); simple.render(document.body); });
PHP Code:<?php
set_time_limit(600);
sleep(50);
echo "submitted";
-
15 Nov 2012 10:38 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 436
Thanks for the report! I have opened a bug in our bug tracker.
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJSIV-7766
in
4.2.


Reply With Quote