Image Maps & JS Appearing Windows

liunx

Guest
Ahhh!<br />
<br />
I just typed out this post and when I clicked preview it said i wasn't logged in! What a crock, because I had just logged in 5 minutes before!<br />
<br />
Anyway. Can't get my pop up window to work with my image maps. <br />
<br />
link: <!-- m --><a class="postlink" href="http://www.hallofwebs.com/theninth/pooltable.html">http://www.hallofwebs.com/theninth/pooltable.html</a><!-- m --><br />
<br />
Thanks, Gandalf :D<!--content-->surely someone knows the answer this problem.<!--content-->your html files are not in the correct directory. Look at the link. Are you sure you posted the files to the directory? Are they in a sub directory or a different dir name? I mean, none of them work... so either they aren't uploaded, or they are in another directory.<!--content-->Thank you so much for a reply. Was beginning to wonder if anyone noticed my posting.<br />
<br />
<!-- m --><a class="postlink" href="http://www.hallofwebs.com/theninth/pooltable.html">http://www.hallofwebs.com/theninth/pooltable.html</a><!-- m --><br />
<br />
I have just uploaded all of the pages. However, the Red 3-ball on the pool table is the only one that I have added the pop-up window script to it's source code. So the other links on the page will simply open their pics in a new window. The JS is in bold below and I'm wondering if I have it in the correct location of the source code.<br />
<br />
<br />
HEAD<br />
<br />
<SCRIPT LANGUAGE="JavaScript"><br />
<!-- Idea by: Nic Wolfe (<!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->) --><br />
<!-- Web URL: <!-- m --><a class="postlink" href="http://fineline.xs.mw">http://fineline.xs.mw</a><!-- m --> --><br />
<br />
<!-- This script and many more are available free online at --><br />
<!-- The JavaScript Source!! <!-- m --><a class="postlink" href="http://javascript.internet.com">http://javascript.internet.com</a><!-- m --> --><br />
<br />
<!-- Begin<br />
function popUp(URL) {<br />
day = new Date();<br />
id = day.getTime();<br />
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=375,left = 262,top = 196.5');");<br />
}<br />
// End --><br />
</script><br />
<br />
<br />
THUMBNAIL<br />
<td><br />
<img src=http://www.htmlforums.com/archive/index.php/"pool-table_19.gif" width="192" height="125" border="0" usemap="#pool_table_19_Map"><br />
</td><br />
<br />
IMAGE MAP<br />
<map name="pool_table_19_Map"><br />
<area shape="circle" alt="Chris" coords="28,53,13" href=http://www.htmlforums.com/archive/index.php/"chris.html" target="_blank"><br />
<area shape="circle" alt="Ashley" coords="150,13,13" href=http://www.htmlforums.com/archive/index.php/"ashley.html" target="_blank"><br />
<br />
<area shape="circle" alt="Phil" coords="140,-12,13" href=http://www.htmlforums.com/archive/index.php/"javascript:popUp('phil.html')"><br />
</map><!--content-->yikes.... <br />
<br />
okay, heres the most basic dumbed down example of a popup script. You should be able to get what you need from it. <br />
<br />
<br />
<html><br />
<head><br />
<title>pop-up</title><br />
<script language ="javascript"><br />
function pop_up(where){<br />
win = window.open(where, 'dep', "height=600, width=800, hotkeys=no, toolbar=no, menubar=no");<br />
}<br />
</script><br />
</head><br />
<h3>pop-up</h3><br />
<body><br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"#" onclick="pop_up('http://www.yahoo.com');">Yahoo</a><br />
<a href=http://www.htmlforums.com/archive/index.php/"#" onclick="pop_up('http://www.eye4u.com');">eye4u</a><br />
<a href=http://www.htmlforums.com/archive/index.php/"#" onclick="pop_up('/images/mypicture.jpg');">my picture</a><br />
</body><br />
</html><!--content-->ok, well, I still have some questions. (still learning JS)<br />
<br />
how does this look: (Questions follow below)<br />
<br />
<head><br />
<script language ="javascript"><br />
function pop_up(phil.html){<br />
win = window.open(phil.html, 'Phil', "height=375, width=500, hotkeys=no, toolbar=no, menubar=no");<br />
}<br />
</script><br />
</head><br />
<br />
<body><br />
<td><br />
<img src=http://www.htmlforums.com/archive/index.php/"pool-table_19.gif" width="192" height="125" border="0" usemap="#pool_table_19_Map"><br />
</td><br />
<br />
<map name="pool_table_19_Map"><br />
<area shape="circle" alt="Chris" coords="28,53,13" href=http://www.htmlforums.com/archive/index.php/"chris.html" target="_blank"><br />
<area shape="circle" alt="Ashley" coords="150,13,13" href=http://www.htmlforums.com/archive/index.php/"ashley.html" target="_blank"><br />
<area shape="circle" alt="Phil" coords="140,-12,13" href=http://www.htmlforums.com/archive/index.php/"#" onclick="pop_up('phil.html');"><br />
</map><br />
</body><br />
<br />
what is the href=http://www.htmlforums.com/archive/index.php/"#" supposed to be? an actual url or left like that with the # sign?<br />
<br />
Thanks again, Gandalf<br />
:D<!--content-->leave the hash mark as is ... A href=http://www.htmlforums.com/archive/index.php/"#"<br />
<br />
it means pretty much do nothing, and lets the onclick handler do everything.<!--content-->Ok, I just uploaded the new page and still have the same problem as before; which is that of, it opens a new window as requested though not 9in the specified window sizes.<br />
<br />
Any idea on this?<br />
<!-- m --><a class="postlink" href="http://www.hallofwebs.com/theninth/pooltable.html">http://www.hallofwebs.com/theninth/pooltable.html</a><!-- m --><br />
<br />
Thanks, Gandalf<br />
:D<!--content-->
 
Back
Top