Bug Tracker

Opened 11 years ago

Closed 9 years ago

Last modified 8 years ago

#4597 closed bug (wontfix)

Fail to append, prepend on IFrame Body element in IE

Reported by: awdhes Owned by:
Priority: major Milestone: 1.4
Component: manipulation Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:

Description

While i am trying to append an element inside the body of IFrame throwing error invalid argument Example: ref of table exist in Iframe

var tblGrid = $('#iframe').contents().find('#tblGrid')

var tblrow = $('<tr>');

tblrow.append('<td> First col</td>');

tblGrid.append(tblrow);

The last line is not working but if i am trying with string instead of html object is working Example: var tblrow="<tr> <td> First child</td></tr>";

tblGrid.append(tblrow);

this is working

could you plz let me know the reson

Change History (1)

comment:1 Changed 9 years ago by dmethvin

Component: unfiledmanipulation
Resolution: wontfix
Status: newclosed

Unfortunately this is a limitation with IE. Elements created in one document (the original document, where the $("<tr>") was created) cannot be appended to another document (the iframe). You could specify a reference to the iframe as the second (context) argument to $(), but usually the safest thing to do is what you already found, which is to use html strings.

Note: See TracTickets for help on using tickets.