Javascript – Auto Currency format in Textbox

Javascript

function auto_currency(id){
	var variable = document.getElementById(id);
	var new_value =  variable.value.replace(/\,/g,"");
	variable.style.textAlign = "right";
	variable.value = digit_grouping(new_value);
}

HTML

<input size="10" onkeyup="auto_currency('coverage')" type="text" id="coverage" name="coverage" />
PG

Author: insic

Subscribe in my RSS Feed for more updates on Web Design and Development related articles. Follow me on twitter or drop a message to my inbox.

Random Post

Delicious

6 Responses to “Javascript – Auto Currency format in Textbox”

  1. Hi. Read this comment and delete it. Your contacts page throws a 404 at this point.

    Cheers.

  2. You’re awesome. How long have you been freelancing?

  3. @Abhijeet thnks man, i know my contact page are inactive. i dont have time to finish it.

    @david im humbled thanks anyway, im doin freelance quite some time now.

  4. Your contact link doesn’t work. Email me to talk about freelance availability.

    Thanks

  5. Good post. I am looking into these issues on my blog.

Leave a Reply