I want to change the user status on click of a Button, so all I am doing is, detecting the current status and changing, if needed.
But in this case the changes the s
Key note from my perspective is that the location of the function for me had to be above the location in which the call originated. Thinking that browser interprets the javascript from top to bottom, if my code for reload was below the object that invokes it, it fails. If I put the code above it, window.location.href = window.location.href; worked.