Javascript – Unable to set ‘data’ attribute for ‘Object’ tag in jQuery. [IE8 only]


I am creating an object element dynamically in jQuery, to render some content. It works in all browsers except IE8.

The code:


The HTML structure created after the execution(in IE8):

    <object type="text/html"></object>

In other browsers[IE9, Firefox, Chrome]:

    <object data="" type="text/html"></object>

Any solutions?

Best Solution

Works for me: using the IE8 developer tools, I can see the data attribute. Here's a screenshot.

(I know I shouldn't have to say it, but: you need to make sure that you're allowing scripts to run.)