Fixes the problem with alphanumeric Persian document numbers
"Persian Document Number Input Fix" is a Jquery plug-in to help Persian web application developers to get an expected behavior while entering an alphanumeric value (mostly a official document number) in a text input reading from left to right (as all numbers are read).
For example start typing "123الف456" characters in a html input text, reading it from left to right. You will you will get "الف123456" entered in the input (depending on your browser or Operating System it may vary). This small code is trying to fix this issue.
Jquery javascript library
include Jquery and the PersianDocumentNumberInputFix.js files in your html document as:
<head>
<script src="jquery.min.js" type="text/javascript"></script>
<script src="PersianDocumentNumberInputFix.js" type="text/javascript"></script>
</head>
Then select your input using jquery and run the "ApplyPersianDocumentNumberInputFix" function:
<script type="text/javascript">
$(document).ready(function () {
$("#PersianDocumentNumberFixedInput").ApplyPersianDocumentNumberInputFix();
});
</script>
check out this Persian post in Narmand blog: http://www.narmand.com/post?id=27