/    Sign up×
Community /Pin to ProfileBookmark

Help with thumbnail popups?

I’m just beginning to learn JavaScript and I’m quite confused. I want to be able to click on a thumbnail on my page and have it bring up a popup featuring the full size image but so far I haven’t been able to do this. ?

I’ve tried so many different things so far that I’m not sure what to copy/paste here. Currently, I have this jumbled mess in the heading:

[CODE]<script language=”JavaScript” type=”text/javascript”>
function popup(url, name, width, height) {
settings=”toolbar=yes, location=yes, directories=yes,” +
“status=no, menubar=no, scrollbars=yes,” +
“resizable=yes, width=” + width+”, height=”+height;

MyNewWindow=window.open(url,name,settings);
}
</script>[/CODE]

And I have this in the body:

[CODE]<a href=”#” onclick=”popup(‘../media/ipadLARGE.jpg’, ‘iPad’, 2400, 1645);”><img src=”../media/ipadSMALL.jpg”
width=”150″ height=”103″ alt=”Picture of an iPad.” /></a>[/CODE]

I apologize if that’s really bad, I’ve been looking at different sources for help and I’m getting confused. *sigh*

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@ghstgrlauthorNov 08.2010 — Still working on it and here is where I'm at now:

<a href="LINKA" onClick="window.open('LINKA');return false"><img src="LINKB" /></a>

(links removed because they reveal personal info)

With the image tag inside, I can see the thumbnail but cannot click anything. When I accidentally goofed it up though, all that showed on my page was a pink border. I noticed that the pink border/line was clickable and it [I]did[/I] lead me to the larger image. So basically it's an issue with how I'm trying to make the image clickable? =/
×

Success!

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