473,320 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to store the last character of a textbox in a variable

Hi
Can any one help me,I want to store the last character typed in a textbox in a variable,and next time when the user enters another character ,the last chracter
gets added to the previous character.
Plz reply soon
Sep 8 '08 #1
3 1973
acoder
16,027 Expert Mod 8TB
You can use the onkeyup event to set the variable.

What have you managed so far?
Sep 8 '08 #2
rnd me
427 Expert 256MB
Expand|Select|Wrap|Line Numbers
  1. <input onkeydown="this.last=this.value.slice(-1,1)" onkeyup="this.value+=this.last" >
Sep 9 '08 #3
...and next time when the user enters another character ,the last chracter
gets added to the previous character.
Hi,

May i know what exactly you mean by "next time" here

Regards
fREDDIE
Sep 9 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: jason | last post by:
I've got this javascript routine (i found on google - thank you) in an asp.net page that on page reload sets the cursor of a textbox to the last line. It works great! Using a similar concept, I...
12
by: harishg2 | last post by:
Hi, How to store a variable value for more than one executions. Ex: main() { int i=0; i++; printf("%d",i);
1
by: tshad | last post by:
I am trying to find the best way to delete the last character from a textbox. For example: status.text = "full/part/" I want to take out the trailing "/". Thanks,
2
by: Sharkie | last post by:
I'm relatively new to XSLT, having strong background in bunch of other programming languages (Perl, Java, etc.). I'm writing an XSLT stylesheet, converting XML into HTML. Everything works just...
0
by: Nata | last post by:
hi all i am trying to store the XML Document object into MS SQL2005 i want to store this as whole not different tables; plz help me regarding this i am trying form last two weeks i asked many...
33
by: Prasad | last post by:
Hi, Can anyone please tell me how to store a 13 digit number in C language ? Also what is the format specifier to be used to access this variable ? Thanks in advance, Prasad P
4
by: ohlpet | last post by:
Hi all I want to store a value in a field (datatype text) that has a space as the last character. When I save this value Access deletes the last space. Can it be done? what am I missing. Best...
8
by: Gary | last post by:
When you declare an array of chars and store a string in it, where is the position of the null character \0? And what happens to the unused memory locations? #include <stdio.h> int main(void)...
1
by: =?Utf-8?B?TGkgUWl1?= | last post by:
Hi, I am trying to get the inserting position of a string within a DataGridViewTextBoxCell in editing mode, based on the cursor point position in selection mode. I used the method...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.