TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
vinnu
NA
61
202.2k
Please modify the java script for number in indian number format
Feb 25 2011 4:49 AM
hi..
check the following code..
<script type="text/javascript">
var indMoney = function (v)
{
v = (Math.round((v - 0) * 100)) / 100;
v = (v == Math.floor(v)) ? v + ".00" : ((v * 10 == Math.floor(v * 10)) ? v + "0" : v);
v = String(v);
var ps = v.split('.'),
whole = ps[0],
sub = ps[1] ? '.' + ps[1] : '.00',
r = /(\d+)(\d{3})/;
while (r.test(whole))
{
whole = whole.replace(r, '$1' + ',' + '$2');
}
v = whole + sub;
return v;
}
</script>
The result of the above function is displaying like this
123,123,123.00
but i want in this format
12,31,23,123.00 i.e indian currency format..
Reply
Answers (
3
)
how to register and silent install of activex dll's in client side by using vbscript
creatiind dynamic controls