/    Sign up×
Community /Pin to ProfileBookmark

Multiple scripts… pop-up image window..HELP!

I have a series of images that, when I click on the thumbnails, I would like to open in a pop-up window fitting the exact size of the image. All the images are either 600×400 wide, or 400×600 tall…. So i created 2 javascript popups, popTall and popWide, so when you click on a wide thumbnail, it accesses popWide, and the tall thumbnails access popTall. The popWide script is first in my code, and it works fine, but the popTall doesnt work at all…. Can you help me with my script so that each one works?! Thanks! Here is the script I’m using in the “HEAD”….

<head>

<SCRIPT LANGUAGE=”JavaScript”>
function popWide(URL) {
day = new Date();
id = day.getTime();
eval(“page” + id + ” = window.open(URL, ‘” + id + “‘, ‘toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=600,height=400,left = 376,top = 135’);”);
}
// End –>
</script>

<SCRIPT LANGUAGE=”JavaScript”>
function popTall(URL) {
day = new Date();
id = day.getTime();
eval(“page” + id + ” = window.open(URL, ‘” + id + “‘, ‘toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=1,width=400,height=600,left = 376,top = 135’);”);
}
// End –>
</script>

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@ucsbgauchoauthorFeb 04.2004 — anyone?
Copy linkTweet thisAlerts:
@ucsbgauchoauthorFeb 05.2004 — got it working... just problems within the code, no ) or " where it shoulda been....
×

Success!

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