rrobles9112 / jquery-formatcurrency

Automatically exported from code.google.com/p/jquery-formatcurrency
GNU General Public License v3.0
0 stars 0 forks source link

Object doesn't support property or method 'formatCurrency' #39

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello, 

I am getting a "SCRIPT438: Object doesn't support property or method 
'formatCurrency'" error when I try to format a value in an ASP hidden field and 
textbox. 
I successfully used the library in 3 other pages, and here is the code for the 
problematic 4th page (breaks at var test=...):
{{{
function RefreshGrid() {
            var nRow = $('#tblCreditNote').dataTable().fnGetNodes();
            for (var i = 0; i < nRow.length; i++) {
                var Total = (nRow[i].children[6].children[0].innerHTML * nRow[i].children[7].children[0].innerHTML).toFixed(2);
                $("input[id$='hfUnformatted']").val(Total);
                var test = $('.hidden').val(Total).formatCurrency().val(); 
.
.
.
}
}}}

Original issue reported on code.google.com by ralphda...@gmail.com on 4 Apr 2013 at 9:29

GoogleCodeExporter commented 9 years ago
Turns out the problem was with duplicated jquery library scripts: on the page 
and a user control on the page. I moved the script reference to the Master page 
and removed from the Child pages and controls to avoid the duplication

Original comment by ralphda...@gmail.com on 15 Apr 2013 at 12:10