Click here to Skip to main content
6,822,613 members and growing! (16,531 online)
Email Password   helpLost your password?
Web Development » Client side scripting » General     Advanced License: The Code Project Open License (CPOL)

Fastest & Smallest Vietnamese JavaScript Input Editor

By nthachus

VietUni Come Back
Javascript, HTML, XHTML
Posted:16 Oct 2008
Views:4,746
Bookmarked:7 times
Unedited contribution
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
0 votes for this article

Introduction  

Many Vietnamese web applications of are using Vietnamese JavaScript typing for input. Some of them are VIM, VietJie, VietUni,... 

Many years ago, I used and very much liked VietUni (V.1.618 - R.11.11.01 by Tran Anh Tuan), because it's very simple, fast and small.

But it doesn't run correctly in browsers now (IE 7, FF, Opera, Nescape,...). So, I've tried to fix those problems and re-build VietUni to be more OOP. And now, I've completed a new version of VietUni (which you might call version 1.7 :).
* I've tried to contact with VietUni's author, but failed. So, I rely on CodeProject to publish this version of VietUni.

Background   

Almost all code and design is kept intact, except the main class and some word-processing methods. All of VN-typing-processing algorithms are kept intact, also.

vietuni_js_1

This version release only one file: VietUni.js (8KB). In that, an instance of CVietUni class has initialized with name VUni. You can use that instance as a global object to process all Vietnamese inputs in your web page.

Using the code    

You may refer to the sample HTML file attached with this article to use this version of VietUni.

To use VietUni 1.7 for your web application, you must include VietUni.js file to your Web Page (ex: master page), and register VN-input method for each VN-input elements as follow:

<html><head>
	// ...
	<script type="text/javascript" src="VietUni.js"></script>
	<script type="text/javascript">
	function initPage() {
		// To enable VN-typing for textbox 'full_name' & textarea 'description'
		VUni.initTyper(document.getElementById("full_name"));
		VUni.initTyper(document.getElementById("description"));
		// All of inputs else (ex: textbox 'email') are not registered VN-typing
	}
	</script>
	// ...
</head><body onload="initPage()">
	// ...

When you want to switch VN-input method, you can call VUni.setMethod(i) (0=OFF, 1=TELEX, 2=VNI, 3=VIQR, 4=AUTO).

Points of Interest  

I've referred to technical documents of favourite browsers now (IE, FF, Konqueror, Safari, Opera, Nescape,...) to fix all bugs of VietUni 1.6.

AndBy making this more OOP, this version can be initialized in more than one instance of VN-typing methods in a web page. 

After releasing this version of VietUni, I'll building a lightweight RichText-Editor with JavaScript and .NET to simplifier for online-editing.

License

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

About the Author

nthachus


Member

Occupation: Software Developer (Junior)
Location: Vietnam Vietnam

Other popular Client side scripting articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
  (Refresh) 
-- There are no messages in this forum --

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads.

PermaLink | Privacy | Terms of Use
Last Updated: 16 Oct 2008
Editor: Sean Ewington
Copyright 2008 by nthachus
Everything else Copyright © CodeProject, 1999-2010
Web21 | Advertise on the Code Project