Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Number validation using custom_func
23/04/2012
07:54
Avatar
sudheer
Member
Members
Forum Posts: 4
Member Since:
23/04/2012
sp_UserOfflineSmall Offline

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.

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information