Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

java function stumper

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi, If anyone can help me with this one I would be really grateful, I'm starting to tear my hair out.(and it's probably something really stupid i'm doing wrong)

Below is the source code of a page that has one big image woth several parts that can be clicke on. Each time a part is clicked i want the script to open up a new browser window (at a predetermined size etc), now the imagemap part seems to be o.k. coz when you click on the linking parts the url line changes to say 'javascript(function}' etc, but it doesn't actually do the script.
I've been staring at it for hours now, and i can't get my head round it, i'm starting to think it is something really easy that i've missed and just can't see it.

If you can spot the mistake(s) i would really appreciate a reply.

many many thanks in advance.

amacfx
-------------------------------------------
<html>
<head>

<title>Pick a word, everyone a winner !!!!</title>
<script language=&quot;JavaScript&quot;>


<!--

function gsoh(one)
{
itsafire=window.open(one,'gsohwindow','toolbar=no,scrollbars=auto,resizable=no,menubar=no,status=yes,directories=no,location=no,width=414,height=376)
}

function incoming (two)
{
difr1=window.open(two,'incomingWindow','toolbar=no,scrollbars=auto,resizable=no,menubar=no,status=yes,directories=no,location=no,width=457,height=457)
}

function speed (three)
{
difr2=window.open(three,'speedWindow','toolbar=no,scrollbars=auto,resizable=no,menubar=no,status=yes,directories=no,location=no,width=400,height=400)
}

function ezagood (four)
{
difr3=window.open(four,'ezagoodWindow','toolbar=no,scrollbars=auto,resizable=no,menubar=no,status=yes,directories=no,location=no,width=600,height=400)
}

function puzle (five)
{
difr4=window.open(five,'puzleWindow','toolbar=no,scrollbars=auto,resizable=no,menubar=no,status=yes,directories=no,location=no,width=600,height=400)
}

function wantsome (six)
{
difr5=window.open(six,'wantsomeWindow','toolbar=no,scrollbars=auto,resizable=no,menubar=no,status=yes,directories=no,location=no,width=600,height=500)
}

function listenup (seven)
{
difr6=window.open(seven,'listenupWindow','toolbar=no,scrollbars=auto,resizable=no,menubar=no,status=yes,directories=no,location=no,width=800,height=376)
}


// end of script-->


</script>



</head>
<body>
<center>
<tr><td align=center valign=top>

<MAP NAME=&quot;menu&quot;>
<area shape=&quot;rect&quot; coords=&quot;286,38,407,74&quot; href=&quot;javascript:gsoh('singles.html')&quot;>

<area shape=&quot;rect&quot; coords=&quot;93,118,260,151&quot; href=&quot;javascript:incoming('incoming.html')&quot;>

<area shape=&quot;rect&quot; coords=&quot;388,122,692,153&quot; href=&quot;javascript:speed('speed.html')&quot;>

<area shape=&quot;rect&quot; coords=&quot;503,203,668,231&quot; href=&quot;javascript:ezagood('spermfinal.html')&quot;>

<area shape=&quot;rect&quot; coords=&quot;83,351,235,391&quot; href=&quot;javascript:puzle('puzle.html')&quot;>

<area shape=&quot;rect&quot; coords=&quot;465,336,729,380&quot; href=&quot;javascript:wantsome('wantsome.html')&quot;>

<area shape=&quot;rect&quot; coords=&quot;43,33,189,75&quot; href=&quot;javascript:listenup('musicreviewer.html')&quot;>



</map>
<IMG NAME=&quot;listings&quot; SRC=&quot;portal.jpg&quot; border=0
USEMAP=&quot;#menu&quot;></TD></tr>


</body>
</html>

------------------------------------
any ideas ??
 
where is the code that calls the functions when each area of the map is clicked ? [sig][/sig]
 
You're missing the single quote at the end of the options in each window.open command. So for the first function the command should end like this:-

.....location=no,width=414,height=376');

Make this change in all the window.open commands and it should work.

Enjoy :)
[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top