473,656 Members | 2,824 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

3 New Member
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 1994
acoder
16,027 Recognized Expert Moderator MVP
You can use the onkeyup event to set the variable.

What have you managed so far?
Sep 8 '08 #2
rnd me
427 Recognized Expert Contributor
Expand|Select|Wrap|Line Numbers
  1. <input onkeydown="this.last=this.value.slice(-1,1)" onkeyup="this.value+=this.last" >
Sep 9 '08 #3
freddieMaize
85 New Member
...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
11241
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 have another application that uses a textbox like an editor window and has a save and other buttons. Problem is - when I save/post/reload, the textbox returns to cursor the top again. How can I preserve / save the exact cursor spot and return...
12
2262
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
1666
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
15438
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 fine, except for one detail which I don't know how to handle. I have one element, which sometimes ends with a period, and sometimes not (the value of that element that is). In the output however, I need a period always. If I place a period inside...
0
3246
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 people but no use. below is my program In that i want to store Document document object into database which as var image/blob/clob plz help me
33
13331
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
2005
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 regards Peter
8
2441
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) { char gstring2 = "dudes"; gstring2 = 'a'; printf("%s \n", gstring2);
1
2422
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 GetCharIndexFromPosition() in class DataGridViewTextBoxEditingControl. It was found that the DataGridViewTextBoxEditingControl.X has 3 pixel more
0
8297
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8816
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8717
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8498
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7311
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5629
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1930
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.