Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: IE vs FireFox

  1. #1
    New to the CF scene
    Join Date
    Feb 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    IE vs FireFox

    Hi

    i have this code that with Firefox work but with IE no;

    function showPhoto (trElemnt){
    if(isKeySent) return;

    var photoID = "";
    var photoIDCell = trElemnt.cells[1];
    alert("photoID 1 ->" + photoIDCell.textContent);


    with IE " photoIDCell.textContent" is udefined.

    can some help to undertstand ?

    thanks in advance

  • #2
    Regular Coder
    Join Date
    Mar 2006
    Posts
    728
    Thanks
    35
    Thanked 132 Times in 123 Posts
    textContent is defined in most browsers, including IE9+, but older IE's require innerText

    alert("photoID 1 ->" + (photoIDCell.textContent||photoIDCell.innerText));


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •