Dear All,
I have a Main Asp.Net page . In that Page I have a Tab Strip which has
SIX tabs each representing a different web Forms.So that when a user
clicks different tab he can navigate between different forms.In my Main
Page I have written a javascript code
function ConfirmClose() {
confirm("Are you Sure You Want to Close This Main Window?") ;
}
and in the body tag of Main form I have written <body onbeforeunload
="ConfirmClose()" >
Now this code is only for the Main Form which has a Tab Strip of SIX
different forms. Now the problem is When the Main Page is loaded
and I click X button of the browser It displays the message
("Are you Sure You Want to Close This Main Window?") which is
fine, but when I navigate to some other Form which is within the
MAIN FORM by pressing the Tab button the above message again
pops up.and it keeps poping up as I navigate through the six forms.
which I dont want. I only want this message to appear when I press
X Button of Main Browser window .
Any help much appreciated.
cheers,
Sunil Sabir