Andrew,

I can't remember all the details now, but I think I solved a similar issue
in this way. Put something like the following before the cancel and submit
buttons.

<input type="image" name="TransparentSubmit" id="TransparentSubmit"
src="images/spacer.gif">

spacer.gif is a transparent 1x1 pixel gif image. The above input element
should act like a submit button with the look and feel of the custom image
supplied. Whatever you normally do for your Submit button, do also for
TransparentSubmit. This way, you should be able to put the cancel button
before the submit button.

HTH,
Peter

-----Original Message-----
From: Andrew Hill [mailto:[EMAIL PROTECTED]
Sent: Friday, September 12, 2003 8:57 AM
To: Struts Users Mailing List
Subject: RE: [Fwd: [XHTML] Default submit button]


Thanks for your help. :-)

-----Original Message-----
From: Adam Hardy [mailto:[EMAIL PROTECTED]
Sent: Friday, 12 September 2003 23:53
To: Struts Users Mailing List
Subject: Re: [Fwd: [XHTML] Default submit button]


I haven't been able to find out anything. As far as I can tell from the
W3C recommendation, there is no recommendation about making one or other
submit button on a form the default.

I asked on the CSS list I use, and they said I was OT and just said what
I repeated above. So if you were hoping there was a style
default-submit:true, you're outa luck.

I've been thinking of making an invisible submit button that would
return false and therefore not cause a submit. But that won't help you.

Adam

On 09/12/2003 05:17 PM Andrew Hill wrote:
> Thanks Adam.
>
> Ive swapped them round now, works a charm :-)
>
> I still wonder if there is any other way to specify the default though?
>
> regards
> Andrew
>
> -----Original Message-----
> From: Adam Hardy [mailto:[EMAIL PROTECTED]
> Sent: Friday, 12 September 2003 23:12
> To: Struts Users Mailing List
> Subject: [Fwd: [XHTML] Default submit button]
>
>
> Hi Andrew
> I believe your first submit button as the HTML appears is the default.
>
> Do this mean your cancel button is before your submit button? Seems
strange.
>
>
> Adam
>
> -------- Original Message --------
> From: Andrew Hill <[EMAIL PROTECTED]>
> To: Struts <[EMAIL PROTECTED]>
> Subject: [XHTML] Default submit button
> Date: Fri, 12 Sep 2003 13:18:51 +0800
>
> Hopefully a quick & simple question: my page has a Cancel and a Submit
> button, both of which are input fields of type submit. At the moment the
> cancel button appears to be the 'default' - so I have to explicitly click
> save to save instead of just anyhow hitting the enter key. How to make
Save
> the default button?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> struts 1.1 + tomcat 4.1.27 + java 1.4.2
> Linux 2.4.20 RH9
>
>
> ---------------------------------------------------------------------
> 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]
>
>

--
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9


---------------------------------------------------------------------
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