i dunno whether this has been posted up before or not, but i really need some help with creating a popup disclaimer.

basically, if an external link is clicked a disclaimer should popup in a new window. at this disclaimer window, there is a Yes and No, if yes is clicked the external link to be visited should open to a new window.

but, currently, my script can only open the external link on my parent window.

any help would be greatly appreciated.


Here's two methods, not sure which of them you mean:

<a href="PUT URL HERE" onclick="return confirm('PUT QUESTION HERE');" target="_blank">PUT TEXT HERE</a>

This one doesn't open anything if the user hits No.

<a href="PUT URL HERE" onclick="if (confirm('PUT QUESTION HERE')) { this.target='_blank'; } else { this.target=''; }" target="_blank">PUT TEXT HERE</a>

This one opens it in the same window if the user hits No.

Both are tested in IE8 and Firefox3.5. Both should open it in a new window without asking if Javascript is disabled.