confirm box with a target

wxdqz

New Member
I have a confirm box that I use on my company's website, when you click on an image, the function runs and sends the user to a new website which will not allow the page to be displayed in frames, however, we display our website in frames. I have tried adding (target="_parent") in a few different places and cannot get it to work. Here is my function:

<SCRIPT LANGUAGE="javascript">
function msgnewsite(theURL,winName,features){ //v2.0
if (confirm("You are now leaving Second National Banks Website!" ))
{
location.href=theURL
alert("You can use the back arrow to come back to Second National Banks Website.")
}
else
{
location.href='loc_offices.asp'
alert("The map will not be displayed")
}
}
//-->
</SCRIPT>

and here is where I call it:


<img src=http://www.webdeveloper.com/forum/archive/index.php/"images\other\mapme1.gif" a href="javascript:;" onClick="msgnewsite('http://www.mapquest.com/maps/map.adp?city=conneaut&state=OH&address=328+main+street&zip=44030&country=us&zoom=5')">
 
Back
Top