Click your browser's Stop button to stop the picture loading and display a confirm box (if the picture's already loaded, click Reload and then immediately click Stop. We used the onabort event handler to run the doNotGo() function which displayed the Confirm dialog box. The onabort event handler also works if you click a link to go to another page before the image has finished loading.