Top.Mail.Ru
? ?
Javascript's Journal
 
[Most Recent Entries] [Calendar View] [Friends View]

Sunday, June 12th, 2005

Time Event
12:20a
Imagemaps and onClick
Hey Java guys and gals,

I'm working on using an imagemap as a main navigation for my band's website. If you go to http://www.ericstevenslive.com and click on the HTML site button, you'll get to the mainpage which is simply one big image map.

I'm trying to make the "News" button open the Band News page in a another window created by the function doNew1(). Here's the code:

for my image map news area:

<AREA onClick="doNew1()" SHAPE="RECTANGLE" COORDS="201,73,266,104"

onmouseover="window.status = '- Band News -'; return true"

onmouseout="window.status = '- The Official Eric Stevens Website -'; return true" href="#">


and for the script:

function doNew1() {

var myPic1 = ""

  if (myPic1.name == null) {

    myPic1 = window.open("newsshell.html","subwindow","width=600,height=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no, resizable=no,left=200,top=250,screenX=200,screenY=250")

  } else{

    myPic1.focus()

  }

}


The problem is that the window will not open when you click in the News area at all. I tried using the same onClick command with an image and a regular HREF and it seems to work fine.

So, why is it not working in the imagemap, am I missing something?
Please help, I have tried practically everything, thanks!

-Matt

Current Mood: indescribable

<< Previous Day 2005/06/12
[Calendar]
Next Day >>
About LiveJournal.com
Image