/    Sign up×
Community /Pin to ProfileBookmark

target a virtual IFRAME

I create a virtual IFRAME using the createElement method
and set my Iframe with different properties.(name and id
are the same)

It works fine but when I target the iframe using

frames[“newiframe”].document.onmousedown=….
or
frames[“newiframe”].document…..

It looks like there is no IFRAME. Ofcourse there is no
iframe, it is a virtual iframe 🙂 but It is supposed
to be recongnised isn’t it ?

Someone have an idea what’s wrong?

thanks in advance

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@sciguyryanOct 20.2004 — Have you tried document.getElementById()?


RyanJ
Copy linkTweet thisAlerts:
@archimedeauthorOct 20.2004 — we can not target it using getElementById beacause

iframe is considerate as frame.

I tryed many ways to do it it seem's it doesn't work

I am working on mozilla but I presume IE has the same

problem

Even using display et visibility is a problem with iframe

I hope someone have a solution if there is a solution. I have read article on the net about iframe. They explain the same methode I use but it doesn't work. I presume they don't test their script before put it on the internet

Thanks in an advance for advices
Copy linkTweet thisAlerts:
@archimedeauthorOct 21.2004 — I FOUND THE SOLUTION


The browser send me bab info!!!!!

I create the element and before to set the properties

of the element, I append the element to the body.

After using the variable which create the element

I set the properties but THAT"S WRONG!

I haven't seen the error because the Iframe appeared on

the sreen.

The trick it is to set properties and after append the

element or append the element and set the object frames

without using the variable which create the element

That is good for all object create with creatElement.

If not the properties of the object create is not recognise

even if the object appears on the screen.
×

Success!

Help @archimede spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...