wolverine4277
27 Jul 2007, 3:14 PM
I have a form with 4 fields (say a, b, c, and d) in it, i need send to the server via POST method 3 of these fields (say a, b, and c) and the field d encrypted via md5.
I can't find the way to do this...
I can add an extra parameter (the encrypted d field, say e) but i don't want to send to the server the field d (because is not encrypted)... only the encrypted one...
myForm.on(
'beforeaction',
function(form, action) {
if (action.type == 'submit') {
Ext.apply(action.options.params || {}, {password: hex_md5(form.findField('password').getValue())});
}
}
);
or
if (myForm.isValid()) {
if (myForm.findField('password').getValue() == myForm.findField('repeated-password').getValue()) {
myForm.submit({
failure: envioDeInformacionNoExitosa,
params: {password: hex_md5(myForm.findField('password').getValue())},
success: ...
url: ...
});
} else {...}
}
If i add an extra parameter with the same field name in the submit method i have two parameters with this name d (without encryption) and d (with encryption)... and the server receives the field d without encryption...
Also i try to change the field value before do the submit and don't works
There is some way to access to the parameters that will be send to the server?
Anybody can help me with this problem?
Thanks
PD: I'm using the latest release of Ext...
I can't find the way to do this...
I can add an extra parameter (the encrypted d field, say e) but i don't want to send to the server the field d (because is not encrypted)... only the encrypted one...
myForm.on(
'beforeaction',
function(form, action) {
if (action.type == 'submit') {
Ext.apply(action.options.params || {}, {password: hex_md5(form.findField('password').getValue())});
}
}
);
or
if (myForm.isValid()) {
if (myForm.findField('password').getValue() == myForm.findField('repeated-password').getValue()) {
myForm.submit({
failure: envioDeInformacionNoExitosa,
params: {password: hex_md5(myForm.findField('password').getValue())},
success: ...
url: ...
});
} else {...}
}
If i add an extra parameter with the same field name in the submit method i have two parameters with this name d (without encryption) and d (with encryption)... and the server receives the field d without encryption...
Also i try to change the field value before do the submit and don't works
There is some way to access to the parameters that will be send to the server?
Anybody can help me with this problem?
Thanks
PD: I'm using the latest release of Ext...