خرید بک لینک

Vote count: 0

Working on an ASP.NET website. I have a page where there are alot of dynamically created textboxes. In addition to these textboxes I link dynamic javascript calculations to certain textboxes as well. This is all database driven. For example....

(pseudo-code)
textbox1 = "10"
textbox2 = "4"
textbox3 = textbox 1 + textbox 2 (displays "14")

All of the textboxes are working great, dynamically calculating correctly, etc.... BUT, I need to format them with commas, if applicable. All of these dynamic textboxes have a css class of 'dynamic_control'.

Question: I would like to autoformat numbers > 999 with commas. (AFTER any calculations are finalized.) So, what I did was this...

        $(document).ready(function () {
            calculateAllTextboxValues();
            $('.dynamic_control').toLocaleString('en-US');
        });

The second line I wanted to apply toLocaleString to all the dynamically created textboxes, by referencing their class. But, for some reason it's not working. Any ideas? Thanks!

asked 3 mins ago

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 30 ارديبهشت 1395 ساعت: 8:07

صفحه بندی