/    Sign up×
Community /Pin to ProfileBookmark

Popups or IFRAME?

Hi there,

I have a main page of a UK map. When the user moves onto a region of the map this displays details to the right of the image using the SHOWTEXT routine. In addition, the text displays a hyperlink requesting the user to view a more detailed map of the area.

What I would like is for that user to click on the hyperlink and my application to bring in the GIF image to the left of the screen on the same page. Any other links on the page should behave normally (ie link to a seperate page etc).

Im a newbie so don’t go rough on me please!!

Many thanks
Paul.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@sciguyryanSep 19.2004 — Well, i'm presuming you want a popup so, try something like this (Untested):

<i>
</i>&lt;script type="text/javascript"&gt;
&lt;!--
function ShowImg(URL){
var OpenWin = window.open();
OpenWin.document.write("&lt;img src='" + URL + "' alt='' /&gt;");
}
//--&gt;
&lt;/script&gt;


And then a call like this:
<i>
</i>&lt;a href="javascript:ShowImg('Rhondda.gif')"&gt;View Rhondda in more detail&lt;/a&gt;


Hope that helps,

RyanJ
Copy linkTweet thisAlerts:
@servlanauthorSep 19.2004 — Hi Ryan,

Thanks for the tip, unfortunately this did not work, but I think this is due to my code.

For example, on my main page I have an Image of the UK. I also have AREA tags that define regions on the map per store location.

In the area tag contains a SHOWTEXT function for a text caption to the right of the UK image. Therefore onMouseOver this displays details about the store (ie Address etc). In addition this contains a hyperlink to show a detailed map of each store. This is where I want the popup to occur.

Here is a sample of my AREA tag with your code...

<area shape="CIRCLE" onMouseOver="showtext('<b>Eplay Milton Keynes</b><br><a href='java script:ShowImg('images/maps/mk.gif')'>MK Store Map</a>')" alt="Eplay MK" coords="184,302,5">

Before the code that worked was...

<area shape="CIRCLE" onMouseOver="showtext('<b>Milton Keynes</b><br><a href='http://localhost/test/images/mk.gif'>MK Store Map</a>')" alt="MK" coords="184,302,5">

The hyperlink is contained within the Showtext routine - thats where I want the popup to start.

Any idea?

Thanks for your help

Paul.
×

Success!

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