Side navigation
#4597 closed bug (wontfix)
Opened April 27, 2009 06:29PM UTC
Closed June 12, 2010 06:48PM UTC
Last modified March 15, 2012 02:16PM UTC
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
Attachments (0)
Change History (1)
Changed June 12, 2010 06:48PM UTC by comment:1
component: | unfiled → manipulation |
---|---|
resolution: | → wontfix |
status: | new → closed |
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.