Of course. Here's some basic code for what I'm trying to do.
Main Topics
Browse All TopicsI'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.sendDat
Switching to other method like 'document.getElementById('
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(
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.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Found what I was doing wrong.
I should have used 'document.getElementById('
The main differences from my previous tries is using "disabled" instead of "disable". With this out of the way, getElementById('Send') worked fine on both IE and Firefox by calling the function from the radio button tag. For the <s:select> it was pretty much the same but changing 'onClick' for 'onChange', checking if the default value was selected or not and disabling or enabling according to this. Also for reference I forgot to add the "disabled="true" on the submit button from my previous example.
I still have another doubt related to this. Is there any way to disable a whole group of textfields in a form (also using Struts 2 tags) without disabling and enabling them one by one? I tried getting them using a 'form.getElementsByTagName
Thanks in advance.
Thanks a lot. That worked just fine. Also, it looks like a lot of my problems came from me misunderstanding the purpose of Struts 2 tags. Javascript procedures like 'form.getElementsByTagName
For example, the tag <s:textfield>, generates a tag <input type='text'> client side. So I can pretty much use any JavaScript function by referencing the final generated tags.
Thanks again
Business Accounts
Answer for Membership
by: gurvinder372Posted on 2009-10-06 at 23:03:23ID: 25512523
Problem description is detailed but please post your source code.