Click here to Skip to main content
15,879,326 members
Home / Discussions / ASP.NET
   

ASP.NET

 
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 
QuestionUser search(ctrl+F) on asp.net page with multiple textboxes Pin
gbabu179-Dec-10 4:31
gbabu179-Dec-10 4:31 
AnswerRe: User search(ctrl+F) on asp.net page with multiple textboxes Pin
T M Gray9-Dec-10 9:55
T M Gray9-Dec-10 9:55 
QuestionPage can't be displayed! Pin
Jassim Rahma9-Dec-10 2:46
Jassim Rahma9-Dec-10 2:46 
AnswerRe: Page can't be displayed! Pin
Hiren solanki9-Dec-10 2:49
Hiren solanki9-Dec-10 2:49 
GeneralRe: Page can't be displayed! Pin
Jassim Rahma9-Dec-10 2:55
Jassim Rahma9-Dec-10 2:55 
AnswerRe: Page can't be displayed! Pin
Hiren solanki9-Dec-10 3:09
Hiren solanki9-Dec-10 3:09 
AnswerRe: Page can't be displayed! Pin
Vimalsoft(Pty) Ltd9-Dec-10 3:30
professionalVimalsoft(Pty) Ltd9-Dec-10 3:30 
GeneralRe: Page can't be displayed! Pin
Jassim Rahma9-Dec-10 3:39
Jassim Rahma9-Dec-10 3:39 
GeneralRe: Page can't be displayed! Pin
Vimalsoft(Pty) Ltd9-Dec-10 3:49
professionalVimalsoft(Pty) Ltd9-Dec-10 3:49 

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.