Click here to Skip to main content
15,888,816 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: Java Script Pin
ZurdoDev19-Dec-12 1:37
professionalZurdoDev19-Dec-12 1:37 
AnswerRe: Java Script Pin
vbmike19-Dec-12 4:28
vbmike19-Dec-12 4:28 
QuestionUsing datePicker to disable dates already selected Pin
xnaLearner11-Dec-12 3:39
xnaLearner11-Dec-12 3:39 
Questionjquery tabslideout plugin and wired behavior Pin
Tridip Bhattacharjee9-Dec-12 21:13
professionalTridip Bhattacharjee9-Dec-12 21:13 
AnswerRe: jquery tabslideout plugin and wired behavior Pin
Mayor Daily17-Dec-12 4:22
Mayor Daily17-Dec-12 4:22 
GeneralRe: jquery tabslideout plugin and wired behavior Pin
Tridip Bhattacharjee18-Dec-12 0:55
professionalTridip Bhattacharjee18-Dec-12 0:55 
QuestionNeed help understanding binding Pin
Steve Bondy7-Dec-12 14:00
Steve Bondy7-Dec-12 14:00 
QuestionText replace Pin
rakeshs3126-Dec-12 23:06
rakeshs3126-Dec-12 23:06 
I have a text box andit will accept only time in the format 00:00(maximum value can be 12:59) . If user enter any of the value greater than this that part only needs to become 00. i have the code like this,but it will change the whole value to 00:00 . In the greater than conditions, what i have to write .

JavaScript
function ValidateTimeControl(s, e) {
    var isValid = true;
    if (e.value != null) {
        if (e.value.substring(0, 1).trim() == "" || e.value.substring(1, 2).trim() == "" || e.value.substring(3, 4).trim() == "" || e.value.substring(3, 4).trim() == "") {
            isValid = false;
        }
        else {
            var hours = parseInt(e.value.substring(0, 2), 10);
            var minutes = parseInt(e.value.substring(3, 5), 10);

            if (hours > 12) {alert(hours)
                isValid = false;
                
            }

            if (minutes > 59) {
                isValid = false;
            }
        }
    }
    else {
        isValid = false;
    }

    if (!isValid) {
        e.value = '00:00';
        
    }
}


Thanks
Rks
AnswerRe: Text replace Pin
Richard MacCutchan7-Dec-12 0:43
mveRichard MacCutchan7-Dec-12 0:43 
GeneralRe: Text replace Pin
rakeshs3129-Dec-12 5:40
rakeshs3129-Dec-12 5:40 
QuestionJQuery datePicker SelectMultiple format dd/mm/yy Pin
xnaLearner6-Dec-12 0:37
xnaLearner6-Dec-12 0:37 
AnswerRe: JQuery datePicker SelectMultiple format dd/mm/yy Pin
srinivas nv6-Dec-12 21:50
srinivas nv6-Dec-12 21:50 
GeneralRe: JQuery datePicker SelectMultiple format dd/mm/yy Pin
xnaLearner10-Dec-12 0:04
xnaLearner10-Dec-12 0:04 
QuestionDelete selected rows by table id using javascript Pin
Member 88023075-Dec-12 8:05
Member 88023075-Dec-12 8:05 
AnswerRe: Delete selected rows by table id using javascript Pin
Deepak Kr15-Dec-12 18:45
Deepak Kr15-Dec-12 18:45 
GeneralRe: Delete selected rows by table id using javascript Pin
Member 88023076-Dec-12 6:20
Member 88023076-Dec-12 6:20 
AnswerRe: Delete selected rows by table id using javascript Pin
Graham Breach6-Dec-12 21:41
Graham Breach6-Dec-12 21:41 
QuestionHTML5 Javascript Issue Pin
#realJSOP3-Dec-12 1:09
mve#realJSOP3-Dec-12 1:09 
AnswerRe: HTML5 Javascript Issue Pin
Graham Breach3-Dec-12 5:00
Graham Breach3-Dec-12 5:00 
GeneralRe: HTML5 Javascript Issue Pin
#realJSOP3-Dec-12 5:22
mve#realJSOP3-Dec-12 5:22 
GeneralRe: HTML5 Javascript Issue Pin
Graham Breach3-Dec-12 6:29
Graham Breach3-Dec-12 6:29 
GeneralRe: HTML5 Javascript Issue Pin
#realJSOP3-Dec-12 6:40
mve#realJSOP3-Dec-12 6:40 
GeneralRe: HTML5 Javascript Issue Pin
Graham Breach3-Dec-12 6:48
Graham Breach3-Dec-12 6:48 
GeneralRe: HTML5 Javascript Issue Pin
#realJSOP3-Dec-12 9:09
mve#realJSOP3-Dec-12 9:09 
GeneralRe: HTML5 Javascript Issue Pin
Graham Breach3-Dec-12 11:02
Graham Breach3-Dec-12 11:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.