Hmm. Didnt realise that the mouseover didnt work for an input image. Ouch!
Thats a bit of a spanner in the works. :-(

Looks like you need to use javascript submission after all if you want to
keep the mouseover.
Unless any of the other listmembers can see a way that Im missing?

What about having the mouseover attributes set in the parent element of the
input? (Havent tried it myself. Probably wont work.)


-----Original Message-----
From: Leticia Golubov [mailto:[EMAIL PROTECTED]
Sent: Monday, 19 January 2004 20:30
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: html:form/Submit question....


Hiya,

Yes, that works, but the input tag doesn't seem to support the onMouseOver,
etc...

so if I associate an input action with my image as below:

<input name="submit" type="image" src="../../images/button_ok.png" alt="Add
New Scope">

that does submit it correctly... but I can't seem to be able to use my
javascript functions here as onMouseOver, etc are not supported by the input
tag.

Of course the other solution would be to submit the form from a javascript
function but that's far less elegant than the current solution...  Any
suggestions?

Andrew, thanks for pointing me in the right direction. :)


-----Original Message-----
From: Andrew Hill [mailto:[EMAIL PROTECTED]
Sent: 19 January 2004 11:31
To: Struts Users Mailing List
Subject: RE: html:form/Submit question....


<snip>
<a onclick ??? (What goes here) ????
</snip>
JavaScript goes here.

<snip>
I don't want to use Javascript,
</snip>
Um. I think you might be getting a little confused.

<snip>
I think I might be confused... :-/
</snip>
Yes, didnt I just say that?

hehe sorry, couldnt resist ;->

Sounds like what your after is the <input type="image... tag (in struts you
can use <html:image...)
html:
http://webdesign.about.com/library/tags/bltags-inputimage.htm
struts tag:
http://jakarta.apache.org/struts/userGuide/struts-html.html#image

You will still need javascript to do the mouseover effects of course, but it
should degrade ok for users without js (they will still be able to click it
to submit).

hth
Andrew


-----Original Message-----
From: Leticia Golubov [mailto:[EMAIL PROTECTED]
Sent: Monday, 19 January 2004 19:20
To: Struts User Mailing List
Subject: html:form/Submit question....


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:

<html:form action="/addNewScope">

..... lots of other code here

<a onclick ??? (What goes here) ????
    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>

..... more code here

</html:form>

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 <html:submit> 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]

Reply via email to