Opened 15 years ago

Closed 14 years ago

Last modified 13 years ago

#441 closed defect (fixed)

IFrameIO with text/html not working properly

Reported by: [email protected] Owned by: anonymous
Priority: high Milestone:
Component: General Version: 0.3
Keywords: Cc:
Blocked By: Blocking:


When using IFrameIO with a mime-type of text/html, the returned data isn't actually returned (I'm under the impression that the contents of the first textarea field element are returned as data to the load function). Actually, a variant on this would work better even if it's not the case.

The following code snippet added to the appropriate place in fixes the problem (at least on mozilla), the first line is a good marker for location:


else{ text/plain

value = ifw.innerHTML;



else{ text/plain

var doc = ifw.document; var e = doc.getElementsByTagName("textarea"); if(e.length) value = e.item(0).innerHTML;



Bill Welliver [email protected]

Change History (4)

comment:1 Changed 15 years ago by [email protected]

Milestone: 0.2.2release0.3release
Version: 0.20.3

actually, it turns out that certain browsers encode html contained within a textarea element, so you can't just get the contents of a textarea and stick it someplace else; the html elements have been converted with > and so forth.

I don't confess to understand the origins of the technique, but it does seem that using a div as the "holder" for the returned value will work better than a textarea.

So, in my example solution, replacing "textarea" with "div" seems to work better.

comment:2 Changed 15 years ago by skinner

Milestone: 0.3release0.4

comment:3 Changed 14 years ago by James Burke

Resolution: fixed
Status: newclosed

This was fixed in 0.3.1, but not in the manner suggested by this bug. The HTML document object is returned. See this test file:

comment:4 Changed 13 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.