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

Quick Cross Browser JS question

  • 10-10-2011 11:48am
    #1
    Registered Users, Registered Users 2 Posts: 3,992 ✭✭✭


    document.getElementById("balanceText").innerText = "111";
    and
    document.getElementById("balanceText").value = "111";

    Both Work grand in IE,

    But will not work in Chrome, FF, Opera or Safari.

    Google is being a bitch and not helping me much.. GAH !


Comments

  • Registered Users, Registered Users 2 Posts: 1,110 ✭✭✭Skrynesaver


    AFAIR the correct accessor is
    document.getElementById("balanceText").innerHTML = "111";
    


  • Registered Users, Registered Users 2 Posts: 3,992 ✭✭✭Korvanica


    sprted.. someone had changed the id field to name, and i didnt notice - (shared project).


  • Registered Users, Registered Users 2 Posts: 4,277 ✭✭✭km991148


    Although it appears that it turned out not to be a cross browser issue, you should consider a library such a jquery when working in JavaScript.

    you can then write statements such as $('#MY_ELEM_ID').html('MY_NEW_HTML');

    and not have to worry abouyt x browser compatibility as much.

    There are also many other benefits of such a library.


Advertisement