Java Error, Please help

wxdqz

New Member
Hi all, I will start by saying I am new to Java scripting so please be kind.


I have a very small problem. I run this sript:

SCRIPT

function window_open2()
{
var newWindow2;
var urlstring = 'midlandshires.htm'
newWindow =
window.open(urlstring,'midlandshires',
'height=300,width=400,left=180, top= 290, toolbar=no,minimize=no,status=no,memubar=no,location=no,scrollbars=yes'
newWindow2.focus()
}

BODY

<map name="Map2">
<area shape="poly" coords="14,40,9,47,10,54,9,64,11,71,8,85,20,87,71,87,74,26,48,24" href=http://www.webdeveloper.com/forum/archive/index.php/"#" onClick="window_open2()" value='...' name="image" alt="Shropshire, Staffordshire, Derbyshire, Nottinghamshire, West Midlands, Worcestershire, Herefordshire, Gloucestershire, North Oxfordshire, Northamptonshire. Leicestershire" title="Shropshire, Staffordshire, Derbyshire, Nottinghamshire, West Midlands, Worcestershire, Herefordshire, Gloucestershire, North Oxfordshire, Northamptonshire. Leicestershire">
</map>

What I want it to do is when button is click on I want it to open a window. This part work OK.

If the user clicks on the screen outside of the opened window the opened windo goes to the back. This part is OK.

What I now want to happen is if the user clicks on the button to open the same window I want the window at the back to come to the front and not open another window.

Can anyone please help.

Thanks in advance


Dereck
 
Top