Skip to main content

Bug Tracker

Side navigation

#4256 closed bug (invalid)

Opened February 26, 2009 10:59AM UTC

Closed March 18, 2009 02:39AM UTC

Can't create iframe with jQuery('html)

Reported by: kNard76 Owned by:
Priority: undecided Milestone: 1.4
Component: core Version: 1.3.2
Keywords: contents Cc:
Blocked by: Blocking:
Description

Hello,

I explain my problem, when i execute this code on Mozilla there is no error, but on Internet explorer return this error :

"Objet requis" (Internet explorer in French)

And this error appears in this command :

"alert($("#crtlSdiv").contents().find("body").length);"

But when i put this command there is no error :

"$("#crtlSdiv").contents()"

Attachments (0)
Change History (2)

Changed February 26, 2009 11:07AM UTC by kNard76 comment:1

Replying to [ticket:4256 kNard76]:

Hello, I explain my problem, when i execute this code on Mozilla there is no error, but on Internet explorer return this error : "Objet requis" (Internet explorer in French) And this error appears in this command : "alert($("#crtlSdiv").contents().find("body").length);" But when i put this command there is no error : "$("#crtlSdiv").contents()"

For more information i create my iframe with jQuery command

Changed March 18, 2009 02:39AM UTC by brandon comment:2

resolution: → invalid
status: newclosed
summary: Problems with the function contents on Internet ExplorerCan't create iframe with jQuery('html)

The issue is that the iframe hasn't completely been loaded by IE yet. You'll need to use the onload event of the iframe before trying to use its contents.