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
  1. #1
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,181
    Thanks
    19
    Thanked 66 Times in 65 Posts

    Changing text in FF.

    Code:
    function setText(){
    document.getElementById("friend").innerHTML = document.getElementById('friendname').value;
    document.getElementById("message").innerHTML = document.getElementById('messageinput').value.replace(/\n/g, '<br />');
    
    }
    works fine in IE, but it FF I get
    Code:
    document.getElementById('friendname') has no properties
    friendname is a span where I want the text to change.

  2. #2
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,583
    Thanks
    3
    Thanked 516 Times in 503 Posts
    mack sure that it has an id

    name will only work for getElementById in IE


 

Posting Permissions

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