Window.open from OnClick event in framed env.
Hi,
I'll try and make this simple, I'm trying to load a page from an OnClick event that needs first to load an alert window. All in a framed-based environment.
While "window.location" works fine, it's biggest caveat is that is loads the requested URL into the "mainframe" area when I'd like to open in a new browser window.
When using window.open, it doesn't work at all??
Here's the snippets of the code involved:
The code with the link:
<A HREF="#" target="_blank" onclick="confirm_prompta('bodycopy bodycopy bodycopy'); return false;">TheLink</A>
The javascript function:
<script language="JavaScript" type="text/JavaScript">
<!--
function confirm_prompta(text) {
if (confirm(text)) {
window.location = ('http://www.theOtherSite.com')
}
}
//-->
</script>
Any help would greatly be appreciated,
Thanks
Nancy
|