Click here to Skip to main content
15,881,709 members
Articles / Programming Languages / Javascript
Tip/Trick

Arabic Textbox Using Unicode Characters

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
2 May 2013CPOL 13.8K   1.1K   1  
Arabic text box using simple JavaScript.

Sample Image

Introduction

Arabic text box using simple JavaScript, this application is supported in all browsers. Here I use Unicode Arabic characters for replacing Arabic characters instead of English so no need for Arabic font for running this. It also supports Arabic numbers.

Using the code

When we type any button in keyboard, the corresponding Arabic character will replace it.

Add yasArabic.js inside <head> </head> for running this application. The main thing is the ID of the textbox must be entered inside the arabicValue() function on attribute onKeyup. So we can add multiple Arabic textboxes in the same page.

XML
<input type="text" onkeyup="arabicValue(text1)" dir="rtl" id="text1" />

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United Arab Emirates United Arab Emirates
ASP.NET Developer at Abudhabi
e-mail:yaseercp@gmail.com

Comments and Discussions

 
-- There are no messages in this forum --