I'm trying to make a script to enable a Submit button (disabled by default) inside a <s:form> tag. This would be achieved by selecting two different radio buttons (iterated and displayed with the Display tag library in 2 different tables) and selecting a choice other than the default one from a drop down list.
I've been able to implement scripts to do this using the standard HTML form tag but referencing the <s:form> doesn't work (it throws an error saying that it can't find the element). I'm trying to do something in the style of 'document.formName.sendData.disabled=false;' but i keep getting this error. The same happens when I use 'document.forms.sendData.disabled=false;'
Switching to other method like 'document.getElementById('sendData').disabled(false);' doesn't throw this error but it doesn't seem to work.
I'm calling to the function from the iterated radio buttons (printed as <input type="radio" ...> by iterating a list via Displaytag) and from the drop down menu (as a <s:select ...> type), and calling to the function using 'onClick="functionChecked()"'. Also I'm trying to make it work both on Firefox and IE6.
Any idea on how to do this? any suggestion that works even for a single group of radio buttons would be great (since I haven't been able to even make that work, and I could go from there for the rest. Thanks in advance.