Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

javascript help please

  • 07-04-2010 09:12PM
    #1
    Closed Accounts Posts: 4


    Background on what i am trying to do :
    javascript function :
    function get_profit_center_total_per_department(dept)
    {
    bla;
    bla;
    var span = $('profit_center'+ dept_pcs+'_span')
    var value = parseFloat(span.childNodes.item(1).value
    bal;
    bla;

    }
    the line that is causing me problem is var value = parseFloat(span.childNodes.item(1).value) now this works in mozilla fine but not in IE .
    I have also tried var value = parseFloat(span.childNodes[1].value) this works in mozilla but not in IE . Thanks for the help


Comments

  • Closed Accounts Posts: 5,482 ✭✭✭Kidchameleon


    are you putting semi colons after the two lines in question?


  • Registered Users, Registered Users 2 Posts: 2,781 ✭✭✭amen


    i hate to even ask but why are you doing this in javascript?
    the data must be coming from somewhere(dtabase?) so why not have the source do the addition for you and just display the total?


  • Registered Users, Registered Users 2 Posts: 3,078 ✭✭✭onemorechance


    var span = $('profit_center'+ dept_pcs+'_span');
    var value = parseFloat(span.childNodes.item(1).value);


Advertisement