Click here to Skip to main content
15,895,777 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: html cleanup [modified] Pin
Hiren solanki14-Dec-10 20:02
Hiren solanki14-Dec-10 20:02 
GeneralRe: html cleanup [modified] Pin
Dhyanga15-Dec-10 3:06
Dhyanga15-Dec-10 3:06 
QuestionAsp.net gauge control Pin
venu65614-Dec-10 1:56
venu65614-Dec-10 1:56 
QuestionLoading CKEditor drop-down plugin from database? Pin
Gregory Gadow13-Dec-10 7:39
Gregory Gadow13-Dec-10 7:39 
AnswerSolution Pin
Gregory Gadow16-Dec-10 9:42
Gregory Gadow16-Dec-10 9:42 
QuestionOk Cancel button using javascript [modified] Pin
padmanabhan N12-Dec-10 23:19
padmanabhan N12-Dec-10 23:19 
AnswerRe: Ok Cancel button using javascript Pin
Sandeep Mewara12-Dec-10 23:28
mveSandeep Mewara12-Dec-10 23:28 
AnswerRe: Ok Cancel button using javascript Pin
NeverHeardOfMe12-Dec-10 23:29
NeverHeardOfMe12-Dec-10 23:29 
GeneralRe: Ok Cancel button using javascript Pin
padmanabhan N12-Dec-10 23:51
padmanabhan N12-Dec-10 23:51 
GeneralRe: Ok Cancel button using javascript Pin
NeverHeardOfMe13-Dec-10 0:12
NeverHeardOfMe13-Dec-10 0:12 
Questionhow can i use search aroo [modified] Pin
Raha_136212-Dec-10 19:42
Raha_136212-Dec-10 19:42 
AnswerRe: how can i use search aroo Pin
Hiren solanki12-Dec-10 21:27
Hiren solanki12-Dec-10 21:27 
AnswerRe: how can i use search aroo Pin
Sandeep Mewara12-Dec-10 23:31
mveSandeep Mewara12-Dec-10 23:31 
GeneralRe: how can i use search aroo Pin
Hiren solanki13-Dec-10 0:30
Hiren solanki13-Dec-10 0:30 
Questionimages in Custom Server Control Pin
FJJCENTU10-Dec-10 23:12
FJJCENTU10-Dec-10 23:12 
AnswerRe: images in Custom Server Control Pin
NeverHeardOfMe10-Dec-10 23:16
NeverHeardOfMe10-Dec-10 23:16 
QuestionJavaScript Function and Problem with Backspace Button Pin
AndyASPVB10-Dec-10 22:38
AndyASPVB10-Dec-10 22:38 
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:02
NeverHeardOfMe10-Dec-10 23:02 
GeneralRe: JavaScript Function and Problem with Backspace Button Pin
AndyASPVB10-Dec-10 23:06
AndyASPVB10-Dec-10 23:06 
GeneralRe: JavaScript Function and Problem with Backspace Button Pin
NeverHeardOfMe10-Dec-10 23:17
NeverHeardOfMe10-Dec-10 23:17 
QuestionAvoid user saving pdf file Pin
SUDHAKAR PALLAM9-Dec-10 21:54
SUDHAKAR PALLAM9-Dec-10 21:54 
AnswerRe: Avoid user saving pdf file Pin
Pete O'Hanlon9-Dec-10 23:27
mvePete O'Hanlon9-Dec-10 23:27 
QuestionSelected Text in a TextBox with TextMode Multiline Pin
FJJCENTU9-Dec-10 4:50
FJJCENTU9-Dec-10 4:50 
AnswerRe: Selected Text in a TextBox with TextMode Multiline Pin
Sandeep Mewara9-Dec-10 5:48
mveSandeep Mewara9-Dec-10 5:48 
AnswerRe: Selected Text in a TextBox with TextMode Multiline Pin
Abhijit Jana9-Dec-10 5:56
professionalAbhijit Jana9-Dec-10 5:56 

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.