Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8642309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:44:31+00:00 2026-06-12T11:44:31+00:00

I am using bigDecimal.js: https://github.com/iriscouch/bigdecimal.js in my node.js project server side with no problems

  • 0

I am using bigDecimal.js:

https://github.com/iriscouch/bigdecimal.js

in my node.js project server side with no problems however when I try the same on the client I can’t seem to reference the bigDecimal object correctly. On the github page it has a link:

http://jhs.iriscouch.com/demo/_design/bigdecimal/_show/ui?e=321.4567890*123456789.123456789987654321

I have a link to bigdecimal.js in my html:

<script src="/javascripts/bigdecimal.js" type="text/javascript"></script>

and the script is definitely there as I can navigate to it in chrome.

my code looks like this:

var bd = {"BigDecimal":BigDecimal, "BigInteger":BigInteger, "RoundingMode":RoundingMode};
var bigDeletedVideoID = bd.BigInteger('9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999');
var bigLowNum = bd.BigInteger('1');
alert(bigDeletedVideoID.subtract(bigLowNum));

But I am getting an error in chrome on the first line saying:

BigDecimal is not defined.

Has anybody had any experience with using BigDecimal and how to do this on a javascript web client?

UPDATED:

I tested the code on localhost i.e. referencing the .js library like so:

http://localhost:11709/javascripts/bigdecimal.js

and I get the alert message appearing correctly.

But when I upload the site to the live server and now it turns into:

    http://pazooza.azurewebsites.net/javascripts/bigdecimal.js

All of a sudden I get 2 errors in particular:

  • unexpected identifier bigdecimal.js line 293
  • BigDecimal is not defined

Why come it works on localhost and not on the live site???

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T11:44:32+00:00Added an answer on June 12, 2026 at 11:44 am

    From: Load javascript via Firebug console

    var script = document.createElement("script");
    script.src = "http://pazooza.azurewebsites.net/javascripts/bigdecimal.js";
    document.body.appendChild(script);
    

    There doesn’t seem to be any namespace conflict as I suspected before rewriting this answer:
    Instead one has to be very precise of not using the symbol ‘BigDecimal’ before the js page has been loaded…

    This is typically handled by onload events.

    Original suggestion was using node.js framework or assuming namespace BD
    as suggested by https://github.com/iriscouch/bigdecimal.js

     var foo=require("bigdecimal.js"); var i = foo.BigDecimal("1235");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am thinking of using BigDecimal to compare two currency values rounded to 2
I am outputing a BigDecimal using EL expression as follows: #{beanActions.overallScore} . But when
I'm using google guava 12 and have a map: Map<OccupancyType, BigDecimal> roomPrice; I have
Using SQL Server 2008 R2 we are looking for a way to select the
I'm trying to write a program for school using the BigDecimal class. The program
I'm running into a strange java bug using the intValue() from the BigDecimal class.
I am using such kind of validation in my rails 3.1 project. validates_presence_of :sales_price
Using BigDecimal , how can I convert 2.00 to 2 , 1.1230 to 1.123
How do I store percent value in MySQL using BigDecimal? I used the following
I'm trying to format a BigDecimal value by using methods of DecimalFormat.format(). My problem,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.