>From my understanding the onSubmit="return true;" code just allows the form to be submitted. See http://www.htmlcodetutorial.com/forms/_FORM_onSubmit.html
I noticed in your pasted output, the "this" is removed from the anchor tags. Could this be the issue? Mike -----Original Message----- From: Mansour [mailto:[EMAIL PROTECTED] Sent: Monday, May 21, 2007 12:53 PM To: Struts Users Mailing List Subject: Re: submitting a form using java script on IE Mike: I tried this one too and I tried using getElementByID and I tried document.all[frmName], they all worked fine. I was able to get the object successfully under FF and IE. I view the contents of this object using simple alerts and JS console in FF. The problem is when submitting the form the event doens't go through. S2 adds the attribute for the form (onSubmit="return true;") which is making things harder. It works fine when using buttons to submit but with anchors it's not . :/ Forsberg, Mike wrote: > I've never used the this.parentNode.submit() in a form. That might only > work in Firefox. (I make no claim if this is true, as I didn't look it > up) > > What I generally use is document.formName.submit(). > > Hope I helped, > > Mike > > -----Original Message----- > From: Mansour [mailto:[EMAIL PROTECTED] > Sent: Monday, May 21, 2007 12:22 PM > To: Struts Users Mailing List > Subject: submitting a form using java script on IE > > I need a table that contains anchors. Clicking on this anchors executes > the Action I need. The table is working great in FF but not in IE. IE is > > getting the form object correctly put can not submit it. When I click on > > the anchor in IE, the page stays there and no action is taken. When I > looked at the html source generated I found that s2 automatically sets > the onSubmit attribute of the form. I am not sure if this has anything > to do with IE not submitting the form. > > > <display:table name="accounts" id="row"> > <display:column title="ID"> > <s:form action="getAccountById" method="post" > name="frm${row.id}" id="frm${row.id}" > > <s:a onclick="this.parentNode.submit();" > href="javascript://"> > <c:out value="${row.firstName}" /> > <c:out value="${row.lastName}" /> > </s:a> > <s:hidden name="acc.id" value="${row.id}" /> > </s:form> > </display:column> > > the generated html looks like: > > <table id="row"> > > <thead> > <tr> > <th>ID</th> > <th>email</th> > <th>Address</th> > <th>Phone</th> > <th>Fax</th></tr></thead> > <tbody> > <tr class="odd"> > <td> > > <form id="frm39" name="frm39" onsubmit="return true;" > action="/fe/getAccountById.action" method="post"> > > <a id="frm39_" href="javascript://" onclick="parentNode.submit();"> > John Smith </a> > > <input type="hidden" name="acc.id" value="39" id="frm39_acc_id"/> > > </form> > > </td > > > > Any Idea what's going on or what to do to fix this ? > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]