Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

How to change an input character to another character?

luckyumerluckyumer Posts: 21Member
Please answer this

I am working on Unicode characters. I wish that if i press 'a' key on my textbox, it should replace to some other unicode character.

For example (something like that)



--- Javascript function ---

myfunc(){
if (event.keyCode==65) {
//Change keyCode to some unicode value like U+0800
}
}


[SO IF I PRESS A, IT CONVERT IT INTO SOME UNICODE CHARACTER]

I can also use

if (event.keyCode==65){
document.forms[0].textbox.value += //(MyUnicodeCharacter)
}

but that do not work if we enter something in the center of text. It will append our entry in the last of the textbox


***** PLEASE HELP. IT WILL BE SO MUCH HELPFUL FOR ME *****
Umer Saleem
Lahore - Pakistan
luckyumer@yahoo.com
Mob: 0092 321 4257504
Sign In or Register to comment.