Leave the page. Using the javascript: protocol all of these should trigger the Good bye! message via the onbeforeunload handler and then navigate to a different page.


Leave (via javascript: from href, this one triggers onbeforeonload twice)
Leave (via javascript: from onclick)

Stay. Using the javascript: protocol none of these should trigger the Good bye! message via the onbeforeunload handler since they don't navigate to a different page.


Stay (via javascript: from href, this one triggers onbeforeunload with IE)
Stay (via javascript: from onclick)

Stay (via javascript: from href, setting protocol flag)