/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] problem adding elements to opened window in internet explorer

Hello,

i’ll first give you the problem:

[code=php]
function test(){
KM=window.open();
submit=document.createElement(“input”);
with(submit){
type=”button”;
value=”test”;
}
KM.document.body.appendChild(submit);
}
[/code]

this works fine in Firefox but internet explorer has a problem with “KM.document.body.appendChild()”,

i receive the error: “No such interface supported”.

Is there someone who had also the same problem, or someone who knows a workaround?

Thank you very much

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@mudeltaauthorOct 23.2006 — the problem is resolved, for those who are interested in the solution:

apparently in Internet Explorer you can't transfer a element that's created in one window to another window.

so here's the working code:

[code=php]
function test(){
testwindow=window.open();
tester=testwindow.document.createElement("input"); //veranderd
with(tester){
type="button";
value="test";
}
testwindow.document.body.appendChild(tester);
}
[/code]
×

Success!

Help @mudelta 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 6.18,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...