/    Sign up×
Community /Pin to ProfileBookmark

targeting document.title""; in new window

I have an image that when clicked targets another larger image to open in a new window. I’m trying to use document.title”” to get rid of the file name in the new window, but it currently changes the title in the original window, not the targeted one.

in <head>:

function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
document.title”hi!”;
}

in <body>:

<a href=”javascript:;” onClick=”MM_openBrWindow(image.gif’,”,’width=600,height=900′)”>

Anyone know how to target this attribute?

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@HaganeNoKokoroMar 30.2005 — I think for this, you need something likefunction MM_openBrWindow(theURL,winName,features) { //v2.0
[color=red]var newwin=[/color]window.open(theURL,winName,features);
[color=red]newwin.[/color]document.title="hi!";
}
Copy linkTweet thisAlerts:
@jpell185authorMar 30.2005 — That made all the Open Browser Window functions on the page not work!
Copy linkTweet thisAlerts:
@HaganeNoKokoroMar 30.2005 — Weird, it didn't cause any problems for me. It does, however, appear that this will only set the title if you open a window and write the document out using javascript. It doesn't look like you can override the <title> tag in the page you load.
×

Success!

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