Need Help with Jquery Append and IE

Discussion in 'jQuery' started by HolyInsomniac, Jan 28, 2010.

  1. #1
    Hello,

    I have tracked down my problem to the JQuery append function. What I am trying to do is load dynamic content, I have tried the append function of JQuery which works perfectly in all browsers except Internet Exploder.

    Can you please suggest any ideas on how I can get this to work?

    Call to append content:
    $(".status_detail_wrapper").append(html);
    Code (markup):
    The actual content of the variable html:
    "<div class="status_message_container" id="status_message_container_886" onmouseover="javascript:showStatusControls(886, &apos;status_message_tools_&apos;); return false; " onmouseout="javascript:hideStatusControls(886, &apos;status_message_tools_&apos;); return false;">
            <img class="status_message_avatar" id="avatar_886" src="/avatars/user_uploaded/topsquid_30.jpg"/>
            <div class="status_body" id="status_body_886">
                   <div class="status_text" id="status_text_886">
                           <span class="status_message_username"  id="status_message_username_0">
    	            <b><a href="#" id="avatar_url_0" onclick="javascript:getUserWall(&apos;topsquid&apos;);return false;">topsquid </a></b>
    	       </span> Need to get off the Lazy horse<br/>
    	</div>
    	<div class="status_message_tools" id="status_message_tools_886">
    	        <a href="#" class="delete_link" id="del_link_886" onclick="javascript:del_status(0, 0, 886, &apos;status_message_container_&apos;);return false;">Delete </a>
    	</div>
    	<div class="status_message_time" id="status_message_time_886">  2 days ago</div
          </div>
    </div>"
    Code (markup):
    Please tell me what I am doing wrong.

    Thanks,
     
    HolyInsomniac, Jan 28, 2010 IP
  2. HolyInsomniac

    HolyInsomniac Peon

    Messages:
    117
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Figured it out. The problem was caused in IE because of &apos; (apostrophe). I replaced all instances of &apos; with \' in my document and we are now IE friendly.
     
    HolyInsomniac, Jan 29, 2010 IP
  3. SteeLx

    SteeLx Active Member

    Messages:
    55
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    61
    #3
    SteeLx, Dec 14, 2012 IP