Newbie: Problem with getting popup linked to geocities site to work

S

Steven Choo

Hi all,

Here's my problem. I have a personal website with a number of images
which each have a few hotspots. When a hotspot is clicked, I would
like a popup to appear of a larger image which would then self close
when clicked on or when the main window is clicked. These larger
images are stored on a separate geocities free site due to space
restrictions on my homepage provider. I also want the words "Enlarged
Picture" to appear as a title on each popup.

I have used a free addin to Frontpage to create the popups and amended
the script generated to try and achieve the closing down of the popup.
I can't seem to get the popup to close or to generate the title
"Enlarged Picture". I played around and discovered that if the larger
image was stored on the main website, that everything worked OK. But
for some reason, the images stored on the geocities site did not work.

Can anyone help with this?

Another problem I found is that the main window would reload itself
again when a hotspot was clicked when a link was to the geocities page
but not when the image was stored on the homepage server. How do I
stop this happening?


See:
http://home.iprimus.com.au/fsc/amalficoastmore.htm

Here's the most important bits of code:

<script language="JavaScript">
<!--
function spawnJimcoPopup(url, name, options, w, h, x, y, scaleType)
{
var windowOptions;
if (scaleType == 'percent')
{
w = (w * screen.availWidth) / 100;
h = (h * screen.availHeight) / 100;
}
if (x == 'center')
{
x = (screen.availWidth - w) / 2;
y = (screen.availHeight - h) / 2;
}
windowOptions = options + ',width=' + w + ',height=' + h + ',left='
+ x + ',top=' + y;
newWindow = window.open(url, name, windowOptions);
newWindow.document.open();
newWindow.document.write("<html><head><title>Enlarged
Picture</title></head>");
newWindow.document.write("<body onmousedown=self.close()
onblur=window.close();self.close();close();top.window.close()
bgcolor='#FFFFFF' text='#000000' topmargin=5 LEFTMARGIN=5
MARGINHEIGHT=5 MARGINWIDTH=5>");
newWindow.document.write("<p align=center><a
onclick='window.close()'><img src=" + url + " alt='Click on pic to
close' border='0'></a></p>");
newWindow.document.write("</body></html>");
newWindow.document.close();
newWindow.focus();
}
//-->
</script>

<map name="FPMap0">
<area href="amalficoastmore.htm" shape="rect" coords="0, 34,
59, 184" alt="The Cathedral at Amalfi"
onclick="spawnJimcoPopup('images/calabria/stilo.jpg','','status=yes','440','340','center','center','pixel');return
false;">
<area href="amalficoastmore.htm" shape="rect" coords="334, 31,
428, 174" alt="A kilo, you say?"
onclick="spawnJimcoPopup('http://www.geocities.com/redcipolla...'340','438','center','center','pixel');return
false;">

</map><img border="0" src="Images/maintitles/mainamalfi.gif"
alt="Please wait while this image downloads ....." usemap="#FPMap0"
width="429" height="389">
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top