/    Sign up×
Community /Pin to ProfileBookmark

popup window from image link/imagemap?

Hi. Please forgive my probably easy question. I’m a neo.

I am building a portfolio site. I would like to have small thumbnail images link to the larger versions. Ideally, I’d like the links to open in a popup window, sized appropriately. I’ve got say 9 thumbs on a page.

I’ve looked at lots of different code but I can’t seem to get it to work.

Here’s what I did:

[U]in the <HEAD>[/U]

<SCRIPT TYPE=”text/javascript”>
<!–
function popup(civic, civic)
{
if (! window.focus)return true;
var href;
if (typeof(civic) == ‘string’)
href=civic;
else
href=civic.href;
window.open(href, civic, ‘width=700,height=400,scrollbars=yes,resizable=yes,status=yes’);
return false;
}
//–>
</SCRIPT>

[U]in the <BODY>[/U]

<DIV ALIGN=CENTER>

<MAP NAME=”civic”>
<AREA
HREF=”civic.html” ALT=”Civic Annual Report” TITLE=”Civic Annual Report”
SHAPE=RECT COORDS=”-1,0,74,64″
onClick=”return popup(this, ‘civic’)” target=”_blank”>
</MAP>

<img src=”Graphics/portfolio%20buttons/civic_thb.jpg” width=”75″ height=”64″ border=”0″ alt=”Civic Annual Report” usemap=”#civic”>

</DIV>

Can anyone help me please?

Thanks!

spark

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@sparkvisualauthorNov 22.2004 — I forgot to mention, I'd like this to open another html page.

I'd like to have some text go along with the image. So I guess the popitup function wouldn't work?
Copy linkTweet thisAlerts:
@smfSep 12.2018 — @sparkvisual#278317 Hey there - Looks like you have been waiting for this answer for a very long time... so you probably won't see this, but here goes: I have a similar problem. I want to make an image map that includes popups. But the popup text needs to be located in another .htm file. This is where I'm running into trouble. I used to have a script borrowed from RoboHelp that did a nice job of this, but it no longer works in modern browsers. It sounded like you were doing something similar, so I was hoping you'd gotten an answer from somewhere else or figured it out on your own. Any luck?

Thanks and best wishes, regardless - SMF
Copy linkTweet thisAlerts:
@rootSep 12.2018 — {"locked":true}
×

Success!

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