I have a view that has a navigation button to another view that looks like this:
I'd like to disable it under certain conditions. I have tried adding a class to it and checking the class in the click handler:
// Start disabled until someone puts something IN the reqOrWO field
// disabled is implemented by returning false on the click action if it has the disabled class
// the disabled class also has visual aspects as well.
event.preventDefault ? event.preventDefault() : event.returnValue = false;
At first, I just tried returning false, but navigation still occurred. So, I tried adding the additional code to call preventDefault() [if present] and event.returnValue [if not]. But none of this seems to prevent the navigation from going to the target page.
Am I missing something? Is there a simpler way?