Also, when I just use the tag: <html:form method="POST" action="/addNewScope"> the page loads correctly, once I use: <html:form method="post" action="/addNewScope" name="submitForm" type="org.apache.struts.action.DynaActionForm" enctype="text/html"> I get error below...
but, of course, I need to name the form, otherwise I can't call it from javascript... -----Original Message----- From: Leticia Golubov [mailto:[EMAIL PROTECTED] Sent: 19 January 2004 16:16 To: Struts Users Mailing List Subject: RE: html:form/Submit question.... mmm, think I'm nearly there, but getting Error Report: org.apache.jasper.JasperException: Cannot find bean under name org.apache.struts.taglib.html.BEAN at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 54) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) which is rather strange considering I have a very similar piece of code somewhere which runs perfectly fine... :-0 Here's the code which should, in theory, submit the addNewScope action when image is clicked on: <html:form method="post" action="/addNewScope" name="submitForm" type="org.apache.struts.action.DynaActionForm" enctype="text/html"> <a onclick="javascript:void(document.submitForm.submit());" href="javascript:void(0);" onMouseOver="SwapImage('ok','../../images/button_ok_over.png');" onMouseDown="SwapImage('ok','../../images/button_ok_click.png');" onMouseOut="SwapImage('ok','../../images/button_ok.png');" onMouseUp="SwapImage('ok','../../images/button_ok_over.png');"> <img name="ok" src="../../images/button_ok.png" border="0" width="42" height="23"> </a> </html:form> Note that somewhere else in the same app (and directory) I have another jsp using a DynaActionForm, so my app should be able to access that dynamic Action form. Mind you, it's not even getting that far. The page is not even loading the form controls... Been racking my brains for last couple of hours on this one, I've given up now... Any clues welcomed!!!! -----Original Message----- From: Thomas Cornet [mailto:[EMAIL PROTECTED] Sent: 19 January 2004 12:13 To: Struts Users Mailing List Subject: Re: html:form/Submit question.... What I understand from your message is that you want to have a 'dynamic' image as a button. An image that changes when the cursor is on the button, or not, which can't be achieved by HTML. The only solution I see is using JavaScript. I don't see why you don't want to use javascript because you use it to change the button's image. Make something like <a onclick='JavaScript:document.forms[0].submit();' href='Javascrip:void(0);' onMouseOver.........> Like this, the form is submitted normally. Thomas At 12:19 19/01/2004, you wrote: >I have a form and my plan is to set all the fields (using DynaActionForm) >when an ok 'button' is pressed, the problem is, I'm not using a 'submit' >action to submit it, but an image, the code I have at the moment is: > >..... lots of other code here >[] > ..... more code here basically, I want the action in the form > (addNewScope) to be submited when I do onclick (where the question marks > are). I don't want to use Javascript, I want call the action... I have > done this before using but this is not what I'm trying to achieve here. I > think I might be confused... :-/ regards Leticia > --------------------------------------------------------------------- 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]

