Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

javascript help please

Options
  • 07-04-2010 10: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 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 Posts: 3,078 ✭✭✭onemorechance


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


Advertisement