Add error and correct display of form

This commit is contained in:
Michael RICOIS 2012-09-26 09:08:11 +00:00
parent a06fea502c
commit 474399108d

View File

@ -3,11 +3,12 @@ $(document).ready(function(){
$('input[type=radio][name=method]').click(function()
{
var value = $('input[type=radio][name=method]:checked').val();
$('input[type=radio][name=method]').each(function(){
if($(this).val()!=value) {
$('#kbis'+$(this).val()).css('display', 'none');
var list = ['M','C'];
for (type in list) {
if(list[type]!=value) {
$('#kbis'+list[type]).css('display', 'none');
}
});
}
if(value=='M' || value=='C') {
if($('#kbis'+value).css('display')=='none') {
$('#kbis'+value).css('display', 'inline');
@ -102,6 +103,8 @@ $(document).ready(function(){
data = '<br/>Le chargement du fichier a échoué';
}
objet.replaceWith(data);
}).error(function(){
objet.replaceWith('Unknown error');
});
}
});