• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: multiple submit - possible workaround advice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multiple submit - possible workaround advice


  • Subject: Re: multiple submit - possible workaround advice
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 24 Apr 2006 15:07:13 -0700

Problem: Some browsers trigger the WOForm action, whilst other trigger the first submit button action when a user hits the enter key. I've tested my test app with IE v4+, Netscape v6+, Opera and Chimera on both mac and windows and can confirm that it is a browser related issue.

After much playing about with this issue, i have decided that the best way to get the behaviour i required was to add a 1x1 pixel image as an WOImageButton at the very top of my form and bind it's action to the action that I want to trigger if the user hits the enter key, and leave the form action method unbound (thanks to Pierre Bernard for this tip). This provides consistent behaviour across all browsers mentioned above. Note that i also add an extra tag to the WOImagButton of TABINDEX="" - this means that as the user tabs through the form elements it doesn't pick up on the single pixel image and hence it is completely invisible to the user.

simon of missmarple.co.uk


Chuck


On Apr 24, 2006, at 2:54 PM, Robert Walker wrote:

So if one had the need to make it appear that the "default" button should be the second or third button in the form, wouldn't it be possible to create this "hidden" image button at the top of the form and bind its action to the same action as the one you want for your "default" action?

Seems logical....

On Apr 24, 2006, at 3:52 PM, Paul Lynch wrote:


On 24 Apr 2006, at 20:48, WebObjects wrote:

Because I have multiple submit buttons in my form, there is always the change that a carriage return may inadvertently trigger the form to fire, and it seems that it will choose the first submit button in the form as the one to receive action/ focus. Because of this I’ve put a harmless (pointless) Submit button early in the form. However, it looks terrible having an element that doesn’t serve a real purpose or belong there.

I’m considering creating an image-submit button, making it a transparent .gif, and thus dispensing of the eyesore. My question before going through the trouble of doing this - will it work? Will this item get focus as do the traditional Submit controls?

WOImageButton works fine - can be transparent, 0x0 size, etc.

Paul

-- Robert Walker email@hidden

There are 10 types of people in the world, those who count in binary, and those who don't.


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net


This email sent to email@hidden


--
Coming in late 2006 - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro


Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects




_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >multiple submit - possible workaround advice (From: WebObjects <email@hidden>)
 >Re: multiple submit - possible workaround advice (From: Paul Lynch <email@hidden>)
 >Re: multiple submit - possible workaround advice (From: Robert Walker <email@hidden>)

  • Prev by Date: Re: multiple submit - possible workaround advice
  • Next by Date: Re: WO Ajax
  • Previous by thread: Re: multiple submit - possible workaround advice
  • Next by thread: Re: multiple submit - possible workaround advice
  • Index(es):
    • Date
    • Thread