Helene Prince

Greenhorn
+ Follow
since Jun 27, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Helene Prince

You are correct that I don't understand everything about struts, but I do know that the form and action class is declared in the struts-config.xml file. The JSP references the action class.... so the struts tag in my page is
<html:form action="UpdateSomeAction" onsubmit="return checkSubmit();">

From the strut-config.xml file, the form and action is declared as:

<form-beans>
<form-bean name="someForm"
type="org.abc.desktop.form.someForm" />

<action path="/UpdateSomeAction"
type="org.abc.action.UpdateSomeAction"
name="someForm"
scope="request" />
</action>


Since the form name and class are declared in the struts-config.xml file, this is where I added the id tag, but it didn't solve my problem. I don't want to slap a band-aid on this to fix it, that's why I'm trying to research the problem. However, time is money and there is a limited supply of time and money sometimes.

I don't easily give up... so I'm still researching and trying to gain a better understanding as I go. Your suggestions have helped tremendously because it helped me to think/look in other directions, so I appreciate all your help!
11 years ago
If my understanding is correct, the form is created through the struts-config.xml file. I attempted to add an id tag there, but it didn't solve my problem. I guess I will stick with using the getElementsByName method since it's working, but at least I now have a much better understanding of the issue.
11 years ago
The HTML that is generated for the bean is <form name="someForm" method="post" action="/UpdateSomeFormAction" onsubmit="return checkSubmit();">

I figured out a solution by using the method getElementsByName, but I would rather not have to do this (lots of places to change the code). Since IE9 changes the id to name, is there anyway to assign an id tag? I've played around with various options, but nothing seems to work.

<jsp:useBean id="someForm" class="org.abc.desktop.form.someForm" scope="request" />

I'm farily new to javascript (inheriting work from others), but I'm learning as I go. Thanks for your help!
11 years ago
I am testing our application with IE9. We have code that works in IE7 but it's not working with IE9.

<jsp:useBean id="someForm" class="org.abc.desktop.form.someForm" scope="request" />

var elea = document.getElementById('someForm');

In IE9, getElementById is returning null.

I'm not a javascript expert, but I've been trying to research this all day. Does anyone have any ideas why this stopped working in IE9 or how to resolve?

Thanks for any help!
11 years ago