bildwelt
E2E FORUM
E2E Bridge E2E Commerce

getElementById(‘sometag’).innerHTML

E2E Forum User Interfaces getElementById(‘sometag’).innerHTML

This topic contains 3 replies, has 2 voices, and was last updated by  Marcel R. 4 years, 8 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #385

    django
    Moderator

    if i want to set the .innerHTML for several tags, it works absolutely fine in Firefox, Chrome and Opera, but not at all in IE. In IE i receive a unknown runtime error because for some reason, IE handles most of the tags’ innerHTML as readonly.

    Any ideas on how to replace the innerHTML function?

    #386

    django
    Moderator

    By the way, the sometag is a DIV, which, according to most solutions should work just fine.

    #390

    django
    Moderator

    tried to replace the innerHTML function with getElementById(‘sometag’).update(newHTML);
    Result was an error saying Object doesn’t support this property or method

    #397

    Marcel R.
    Blocked

    Try not to use the JS DOM api if you wanna be cross-browser compatible, use jQuery instead. You have various options to set elements:
    – Setting/reading html strings (might apply to your case): html(): http://api.jquery.com/html/
    – Setting/reading plain text: text(): http://api.jquery.com/text/
    – Setting/reading values of input elements: val(): http://api.jquery.com/val/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.