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
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,963
    Thanks
    120
    Thanked 76 Times in 76 Posts

    innerHTML - does not become HTML ?

    Code:
    //this works, i.e. link appears as link
    mTopDiv2.innerHTML ="Arange 1.0.0 © by <B>Cvenkel Miran</B> <a href = 'http://agrozoo.net/'>agrozoo.net</a>";
     
    //this does not, i.e everything appears as ordinary text
    mTopDiv2.innerHTML = explanationText + "&nbsp;&nbsp;&nbsp;&nbsp;" + copyrightText;
    //it appears as this text:
    <a href = 'http://en.wikipedia.org/wiki/Silver-washed_Fritillary'>Argynnis paphia</a> <a target = '_blank' href = 'http://www.slo-foto.net/portfolio/BubikolRamios'>© Cvenkel Miran</a>
    ?
    Last edited by BubikolRamios; 12-10-2010 at 11:19 AM.
    Found a flower or bug and don't know what it is ?
    agrozoo.net galery
    if you don't spot search button at once, there is search form:
    agrozoo.net galery search

  • #2
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,963
    Thanks
    120
    Thanked 76 Times in 76 Posts
    I had '&lt;' instead of '<' in those variables

    Hmm, posibly coz some html validator complained ,...
    Found a flower or bug and don't know what it is ?
    agrozoo.net galery
    if you don't spot search button at once, there is search form:
    agrozoo.net galery search


  •  

    Posting Permissions

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