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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

javascript help please

  • 07-04-2010 9: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