NetTalk Central

Author Topic: Default Button on a Form  (Read 4256 times)

pcrafton

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Email
Default Button on a Form
« on: April 21, 2008, 02:29:03 PM »
4.30:

I have a memory form with a "FIND" button and a "SHOW RESULTS" button, both on the same line. I have the FIND button checked as default, but the SHOW RESULTS button is showing as the default (both IE and FF). Is this a known problem, as
my users will want to hit the ENTER key and not click FIND. or have I forgotten to do something?

Regards

Paul Crafton

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: Default Button on a Form
« Reply #1 on: April 22, 2008, 02:21:48 AM »
Hi Paul,

Are either, or both, of the buttons "submit" buttons?

And, um, how does a default button "show" in the browser? I've not seen a difference (visually) between the default button and any other button. At least I don't think I have...

Cheers
Bruce


pcrafton

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Email
Re: Default Button on a Form
« Reply #2 on: April 22, 2008, 08:12:09 AM »
Bruce:

originally they were both submit, but I changed one to button(the second one), and the second one is still the default, not the one I selected.

Is there a way for me to add additional code to the onClick event for the first button? I could tag on a javascript function to do what I need, and get rid of the second button?

Paul Crafton

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: Default Button on a Form
« Reply #3 on: April 22, 2008, 10:53:38 PM »
Perhaps send me the app Paul. I'm not sure why you're getting the effect you're seeing. I'm guessing that it's something fairly simple.

cheers
Bruce

Mike Grigsby

  • Sr. Member
  • ****
  • Posts: 380
    • Yahoo Instant Messenger - onthedotsoftware
    • View Profile
    • MyHomeAssets! Software (among others)
Re: Default Button on a Form
« Reply #4 on: April 22, 2008, 11:01:35 PM »
I'm seeing the same thing in my apps but can't figure out what the difference is between this and the example apps that work okay. Just thought I'd add my experience to support the problem.
Mike Grigsby
Credify Systems
Central Oregon, USA

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: Default Button on a Form
« Reply #5 on: April 23, 2008, 05:06:09 AM »
Obviously one thing to check is that only one button has the "default button" option ticked.

Cheers
Bruce

pcrafton

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Email
Re: Default Button on a Form
« Reply #6 on: April 23, 2008, 07:18:34 AM »
I checked that, the first button (a submit button) has default check, the second(a button type) does not. But when the form is displayed, the second is the one with focus not the first.

Paul

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: Default Button on a Form
« Reply #7 on: April 23, 2008, 11:59:01 PM »
Hi Paul,

We creep ever closer to the root of the problem.
Perhaps the issue is not a "Default Button" issue, but a "Focus" issue?

The default button is the button pressed when the user hits Enter - assuming of course they are on an entry field at the time. If a button has focus, then pressing enter will press that button. What does the form look like - perhaps post a screen shot so we can see.

Cheers
Bruce



pcrafton

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Email
Re: Default Button on a Form
« Reply #8 on: April 24, 2008, 04:34:19 AM »
Once the desired fields are entered, the user clicks FIND ( I want enter to cause the default button to fire). Then the user clicks on Show Results which displays the table in image #2. By clicking on the hyperlink in the table on the second web page, the third web page (image #3)  is generated on the fly and is displayed.

attached are the images of the form, and other web pages (for reference, they work great)



[attachment deleted by admin]