Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Changing currency with the editable invoice

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #28525
    gerkintrigg
    Member

    I am having major issues changing from dollars to pounds for the editable invoice. It’s great and works perfectly in dollars, but changing to pounds (£) is very difficult… i thought it was simply changing the javascript and replacing the dollar signs with the pound symbol, but it seems to be linked to the math elements.

    Suggestions?

    #72978
    Democritus
    Member

    You should post a little bit of code next time.

    I’m assuming you want to have javascript functions that convert from dollars to pounds, and back.

    Code:
    function dollarsToPounds(dollars) {
    return dollars * [i]conversion rate to pounds[/i];
    }

    function poundsToDollars(pounds) {
    return pounds * [i]conversion rate to dollars[/i];
    }

    Then, anytime you use it, just make a function call like:

    Code:
    var moneyInPounds = 10;
    var moneyInDollars = poundsToDollars(moneyInPounds);
    document.write(moneyInDollars);
    #72985
    gerkintrigg
    Member

    No actually, it’s only the symbol that i want to change, not the maths. The script works fine exactly as it is, (it’s the freebies editable invoice found here: http://css-tricks.com/downloads/layouts-templates/ ) but it uses dollar symbols rather than the pound symbol.

    I only want the output to use the pound symbol rather than the dollar symbol. it should be pretty simple to replace $ with £ but it stops the functionality for some reason and I can’t figure out why.

    #80810
    muyilleum
    Member

    got exactly same problem. Can someone please post the solution? Thanks

    #92685
    etieqa
    Member
    #253528
    dhaval
    Participant

    I want to change $ currency To Rupees. help me..

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.