Forum
07:54
23/04/2012
Hi,
I am performing number validaton on specific column. when i click on submit it validates the input and if it is true i return [true,""]. but at the top of the form dialog an empty message is displaying with red color background and not able to save the data.
Please check my code
function CheckForN(value, colname) {
debugger;
var a = Number(value);
var msg ;
if ( a.toString() == 'NaN' || typeof a == 'undefined' || typeof a == null || typeof a == 'null' || a == NaN) {
msg = 'Enter Valid Number for ' + colname;
$('#divModal').html(msg);
$("#divModal").dialog("option", "buttons", { "Close": function () { $(this).dialog("close"); $("#divModal").html(""); } });
//$('#' + id[0].trim()).focus();
//$('#closedialog').click();
//$('#info_dialog').hide()
//$('#divModal').dialog({ open: function (event, ui) { $('#divModal').focus(); } });
$('#divModal').dialog('open');
//$('#Phone').keyup();
//$('#info_dialog').focus(function () { $('#info_dialog').hide(); });
//$('#info_dialog').hide()
return [false, msg];
}
else {
// $('#FormError').hide();
return [true, ""];
msg = "";
}
return [true,""]
}
i am calling above function for number column. for all other columns it is working fine. Please give your suggestions.
Most Users Ever Online: 715
Currently Online:
52 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66