User Profile

Collapse

Profile Sidebar

Collapse
vabby
vabby
Last Activity: Apr 21 '07, 10:43 PM
Joined: Mar 24 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Code:
    function calculateTVN() 
                { 
                 if (document.getElementById ("ctl00_ContentPlaceHolder1_txtMillilTVNHraefni").value != "") 
                 {
                        var tvn = parseFloat(document.getElementById("ctl00_ContentPlaceHolder1_txtMillilTVNHraefni").value.replace(/,/gi, '.'))*14;
                        var tvna  = tvn.toFixed(2);
                        //tvn
    ...
    See more | Go to post

    Leave a comment:


  • Hey guys,
    Change comma fore a dot and a dot for a comma works perfectly.
    Now I have a problem with some numbers, for example if user put in 1,9 it displays 26,59999, I have lost the function .toFixed(2) in “document.getEl ementById('ctl0 0_ContentPlaceH older1 _txtNidurstTVNH raefni').value = tvns.toFixed(2) ;” do you know how to fix that.

    Thanks again.
    See more | Go to post

    Leave a comment:


  • Thank you very much guys. It works perfectly ;)
    See more | Go to post

    Leave a comment:


  • How to replace a comma for a dot and a dot for a comma

    Hey guys.
    I have a problem with my code, I can replace comma for a dot here. "var tvn = parseFloat(docu ment.getElement ById('ctl00_Con tentPlaceHolder 1_txtMillilTVNH raefni').value. replace(/,/g, '.')*14);" and multiply with 14, that works fine, but i can't replace a dot for a comma before I display the sum. In me country we use comma instead of a dot for separating decimal numbers

    For example: a user has to be able to...
    See more | Go to post
No activity results to display
Show More
Working...