Click here to Skip to main content
15,886,038 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: how to gridivew in-place edit with jquery Pin
Not Active10-Jan-11 2:46
mentorNot Active10-Jan-11 2:46 
Questionregarding Jquery Modal popup Pin
Tridip Bhattacharjee9-Jan-11 23:56
professionalTridip Bhattacharjee9-Jan-11 23:56 
AnswerRe: regarding Jquery Modal popup Pin
Not Active10-Jan-11 2:44
mentorNot Active10-Jan-11 2:44 
GeneralRe: regarding Jquery Modal popup Pin
marc lambert o. agas19-Jan-11 21:44
marc lambert o. agas19-Jan-11 21:44 
GeneralRe: regarding Jquery Modal popup [modified] Pin
Not Active20-Jan-11 2:44
mentorNot Active20-Jan-11 2:44 
GeneralRe: regarding Jquery Modal popup Pin
Manfred Rudolf Bihy20-Jan-11 4:23
professionalManfred Rudolf Bihy20-Jan-11 4:23 
GeneralRe: regarding Jquery Modal popup Pin
Not Active20-Jan-11 12:32
mentorNot Active20-Jan-11 12:32 
Questionurl from textbox in iframe [modified] Pin
dlog19729-Dec-10 15:59
dlog19729-Dec-10 15:59 
AnswerRe: url from textbox in iframe Pin
Manfred Rudolf Bihy29-Dec-10 16:11
professionalManfred Rudolf Bihy29-Dec-10 16:11 
AnswerRe: url from textbox in iframe Pin
Bryian Tan3-Jan-11 14:53
professionalBryian Tan3-Jan-11 14:53 
GeneralRe: url from textbox in iframe Pin
dlog1975-Jan-11 0:15
dlog1975-Jan-11 0:15 
GeneralRe: url from textbox in iframe Pin
dlog1975-Jan-11 0:32
dlog1975-Jan-11 0:32 
GeneralRe: url from textbox in iframe Pin
Bryian Tan5-Jan-11 15:02
professionalBryian Tan5-Jan-11 15:02 
GeneralRe: url from textbox in iframe Pin
musefan5-Jan-11 23:22
musefan5-Jan-11 23:22 
GeneralRe: url from textbox in iframe Pin
dlog1976-Jan-11 1:29
dlog1976-Jan-11 1:29 
GeneralRe: url from textbox in iframe Pin
musefan6-Jan-11 2:09
musefan6-Jan-11 2:09 
QuestionXSL DropDown Pin
manowj24-Dec-10 21:42
manowj24-Dec-10 21:42 
AnswerRe: XSL DropDown Pin
Sunasara Imdadhusen4-Jan-11 22:19
professionalSunasara Imdadhusen4-Jan-11 22:19 
QuestionJavaScript not working for chrome Pin
Varun Sareen20-Dec-10 23:38
Varun Sareen20-Dec-10 23:38 
AnswerRe: JavaScript not working for chrome Pin
phil.o21-Dec-10 0:39
professionalphil.o21-Dec-10 0:39 
QuestionJavaScript Function and Problem with Backspace Button Pin
AndyASPVB10-Dec-10 23:07
AndyASPVB10-Dec-10 23:07 
Hi
I have a javascript function that is applied to a textbox onkeyup so that when a user puts in a date in the format of dd/mm/yyyy it puts in the forward slashes. It also stops the user exceeding ten characters. However, when the user uses the backspace button, whilst the numbers are deleted, unless you keep down on the button, I can't get the backspace button to move back beyond the slashes.

Here is my code, and I have highlighted in bold the bit that is not working:

function DateInputUpdate(input) {                
    if ( input.value.length == 2 || input.value.length == 5 )
        input.value = input.value + dateSep;

       if (input.value.length > dateFormat.length) {
        input.value = input.value.substring(0, dateFormat.length);

       if (event.keyCode == 8) {
         if (input.value.length == 3 || input.value.length == 6) {
            input.value = input.value.substring(input.value.length, input.value.length - 1);
       }
      }
    }
}



Can someone please advise me what I need to do or change? I don't particular wish to delete the slashes, more to ignore them or skip over them that's my ideal solution.

Thanks
AnswerRe: JavaScript Function and Problem with Backspace Button Pin
NeverHeardOfMe10-Dec-10 23:20
NeverHeardOfMe10-Dec-10 23:20 
Questionaspx page functionality call from javascript in html page Pin
ramuksasi9-Dec-10 6:22
ramuksasi9-Dec-10 6:22 
AnswerRe: aspx page functionality call from javascript in html page Pin
Gerben Jongerius9-Dec-10 20:21
Gerben Jongerius9-Dec-10 20:21 
GeneralRe: aspx page functionality call from javascript in html page Pin
Monjurul Habib1-Mar-11 8:30
professionalMonjurul Habib1-Mar-11 8:30 

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.