I am not sure why the menu does not disable itself when navigating to another url? I guess that the navigation could fail and then the menu would still be disabled. Some timeout would resolve that problem.
I decided to implement a page disable on menu navigation myself. I am posting the code here in hope that it will save time for others.
Much of this comes from information gathered by searching the net. There is a lot of good and bad info about disabling a page. Hopefully, the method I chose will work for most situations.
This is meant to be used for a main website menu that uses URL's. I simply check for "#" as the first character. If you are using javascript etc. instead / or as well as URL's, the code may need to be changed / extended.
C#
Javascript
I used a timeout of 15 seconds in case the navigation fails. It is easy to change it in the code. And, you will need a "images/loading.gif" or change the image src in the code (perhaps a parameter woudl be nice?)
Some browsers do not show the image. There could be a problem with the textAlign, margin-top etc.
Please post any fixes / improvements.