adds a javascript program to navigate on popup window confirmation