@HiEv:
There's no point in doing the code using the...
This is why: I didn't disregard the HTML based solution; didn't promote one method over then other; and why I stated "If you want to use JavaScript", thus leaving the choice of methods up to the OP.
I was simply predicting the "The JavaScript code results in an error message" comment when / if someone tried to use the original JavaScript example within the Passage (because you didn't indicate that they shouldn't do that, nor did the OP state that they wanted to interactively change the disabled state of the element), and correcting the problem before it occurred.
..JavaScript code works just fine in...
I didn't state that your JavaScript code wouldn't work in other use-cases just that it wouldn't work in the particular one that it was potentially going to be used in, which was a <<script>> macro being executed directly within a Passage. (based on the fact that there was no mention of using the method interactively)
edit: You know as well as I do why calling the <<script>> macro within your <<link>> macro based example works when the same <<script>> macro called directly within the Passage wont.