/    Sign up×
Community /Pin to ProfileBookmark

Adding javascript to window.

Is there a way to add text to a window I open? For example, when I do:

[code=php]
theWindow = window.open(‘http://www.mywebpage.com’, ‘window2’, ‘width=100, height=100, location=no, menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=no’);

theWindow.document.write(‘blah blah’);
[/code]

it erases all the old html and replaces it with what is included in the write function. But what I need is to open a new window to a url and append text to the end of it. Is this possible?

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@A1ien51Mar 19.2005 — if you have a div/span at the end, you can use innerHTML
×

Success!

Help @abudabit 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.26,
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,
)...