/    Sign up×
Community /Pin to ProfileBookmark

simple question… I think

Hi,

I’m a newbie to Java and I need a little help. I have a page of thumbnails that opens a pop-up window using the “window.open” method. When the pop-up window is opened, the thumbnail page refreshes. Is there any way to avoid this?

Much thanks,

-Will ?

to post a comment
JavaScript

7 Comments(s)

Copy linkTweet thisAlerts:
@mityaJul 31.2004 — How are you opening the pop-up, via a link and an onClick event? If so, what is your link's href? Something on your page (or, less likely, in the script) is telling the page to go somewhere.
Copy linkTweet thisAlerts:
@wda203authorJul 31.2004 — here's an example:


*******************************

<a href="javascript:location='www.url.com'; window.open('newPage.html', '_blank', 'HEIGHT=675, WIDTH=919, SCROLLBARS=YES');"><img src="thumbnail.jpg" width="66" height="100" border="0"></a>


*******************************

Let me know if you can help...

-Will
Copy linkTweet thisAlerts:
@HaganeNoKokoroJul 31.2004 — I think the offending part is
<i>
</i>location='www.url.com'

that part tells the window to go to a new location (although if www.url.com is the current page, this boils down to the same as a refresh). Try taking that out, like
<i>
</i>&lt;a href="javascript:window.open('newPage.html', '_blank', 'HEIGHT=675, WIDTH=919, SCROLLBARS=YES');"&gt;&lt;img src="thumbnail.jpg" width="66" height="100" border="0"&gt;&lt;/a&gt;

and see how it does.
Copy linkTweet thisAlerts:
@wda203authorJul 31.2004 — Removing the location just makes the thumbnail page refresh as a blank screen with only the word [object] displayed.

Any other ideas?

Thanks,

-Will
Copy linkTweet thisAlerts:
@steelersfan88Jul 31.2004 — &lt;a href="newPage.html" onclick="window.open(this.href,'_blank','HEIGHT=675,WIDTH=919,scrollbars');return false;"&gt;&lt;img src="thumbnail.jpg" width="66" height="100" border="0"&gt;&lt;/a&gt;Dr. Script
Copy linkTweet thisAlerts:
@wda203authorJul 31.2004 — That worked!

Thank you steelersfan88 et all ?
Copy linkTweet thisAlerts:
@steelersfan88Jul 31.2004 — Sure ?
×

Success!

Help @wda203 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.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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

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