dprocakan
20 May 2007, 7:44 PM
I have a multicolumn form, copied from samples, and modified, It doesn't want to submit, here's the code.
Ext.onReady(function()
{
encryptForm = new Ext.form.Form({
labelAlign: 'top',
labelWidth: 75,
buttonAlign: 'right'
});
encryptForm.column({width:252, labelWidth:75}); // open column, without auto close
encryptForm.fieldset(
{legend:'Encryption Info'},
new Ext.form.TextArea({
fieldLabel: 'Text',
name: 'text',
height: 140,
allowBlank:false
}),
new Ext.form.TextField({
fieldLabel: 'Password',
name: 'password',
inputType: 'password'
})
);
encryptForm.end(); // closes the last container element (column, layout, fieldset, etc) and moves up 1 level in the stack
encryptForm.column({width:252, height:455, style:'margin-left:10px', clear:true});
encryptForm.fieldset(
{legend:'Encryption Info'},
new Ext.form.TextArea({
fieldLabel: 'TextColumn',
name: 'text_column',
height: 140,
allowBlank:false
}),
new Ext.form.TextField({
fieldLabel: 'PasswordColumn',
name: 'password_column',
inputType: 'password'
})
);
encryptForm.end();
encryptForm.end(); // close the column
encryptForm.applyIfToFields({
width:230
});
var encryptButton = encryptForm.addButton('Encrypt');
encryptButton.on('click', onClick);
encryptForm.render("form-ct4");
});
onClick = function()
{
encryptForm.submit({
url:'debug.php',
method:'post',
waitMsg:'Loading',
success:function(form, action, o)
{
alert("Success");
},
failure:function(form, action)
{
alert("Failure");
}
});
}
the file, debug.php isn't being executed, but I wrote everything correct, because when I change submit to load it works.
The result of it is execution of failure handler function, but the form isn't being submited to debug.php.
Any ideas?
rgrdz Harut.
Ext.onReady(function()
{
encryptForm = new Ext.form.Form({
labelAlign: 'top',
labelWidth: 75,
buttonAlign: 'right'
});
encryptForm.column({width:252, labelWidth:75}); // open column, without auto close
encryptForm.fieldset(
{legend:'Encryption Info'},
new Ext.form.TextArea({
fieldLabel: 'Text',
name: 'text',
height: 140,
allowBlank:false
}),
new Ext.form.TextField({
fieldLabel: 'Password',
name: 'password',
inputType: 'password'
})
);
encryptForm.end(); // closes the last container element (column, layout, fieldset, etc) and moves up 1 level in the stack
encryptForm.column({width:252, height:455, style:'margin-left:10px', clear:true});
encryptForm.fieldset(
{legend:'Encryption Info'},
new Ext.form.TextArea({
fieldLabel: 'TextColumn',
name: 'text_column',
height: 140,
allowBlank:false
}),
new Ext.form.TextField({
fieldLabel: 'PasswordColumn',
name: 'password_column',
inputType: 'password'
})
);
encryptForm.end();
encryptForm.end(); // close the column
encryptForm.applyIfToFields({
width:230
});
var encryptButton = encryptForm.addButton('Encrypt');
encryptButton.on('click', onClick);
encryptForm.render("form-ct4");
});
onClick = function()
{
encryptForm.submit({
url:'debug.php',
method:'post',
waitMsg:'Loading',
success:function(form, action, o)
{
alert("Success");
},
failure:function(form, action)
{
alert("Failure");
}
});
}
the file, debug.php isn't being executed, but I wrote everything correct, because when I change submit to load it works.
The result of it is execution of failure handler function, but the form isn't being submited to debug.php.
Any ideas?
rgrdz Harut.