How do I set the value of the href based on a variable value.
As of now, I have the follwing code:
<a href="javascript:clearDate('txtDueDate');"
Waht I need is shown below. I want the href value to be disabled if udisable is true.
var udisable = '<%=dueDateDisabled %>';
if (udisable == "false")
<a href="javascript:clearDate('txtDueDate');"
else
<a href="javascript:void(0);"
Try
or even better: Create your own function encapsulating this: