% HERE IS YOUR CODE: I'm not sure for your answer but i hope this may satisfy you.
var where_to= confirm("Do you really want to go to this page??");
if (where_to== true)
<!--Put a link here -->New Page