Skip to content

Instantly share code, notes, and snippets.

@afshinm
Created February 24, 2013 12:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save afshinm/5023576 to your computer and use it in GitHub Desktop.
Save afshinm/5023576 to your computer and use it in GitHub Desktop.
using PersianJs in ASP.NET web form
<script type="text/javascript" src="scripts/persian.js"></script>
<asp:TextBox ID="TextBox1" runat="server" Text = "" ForeColor = "Gray"></asp:TextBox>
<div id="output"></div>
<script type="text/javascript">
$("#<%=TextBox1.ClientID%>").keypress(function () {
if ($("#<%=TextBox1.ClientID%>").val() != "") {
console.log("key pressed");
$("#output").html(persianJs($("#<%=TextBox1.ClientID%>").val()).englishNumber());
}
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment