NetTalk Central

Author Topic: Set OK button not to be the default  (Read 2571 times)

John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
Set OK button not to be the default
« on: January 25, 2012, 02:28:48 PM »
I have found that if you have a field with some server side code to be run when tab is pressed and the user presses Enter instead, then the OK button on a form is actioned.

This means that code can be bypassed inadevertently

Would it be possible to make a button to NOT be the default button.

Basically, I want my users to be forced to press the OK button rather than pressing Enter.

Thanks

John

bruce2

  • Full Member
  • ***
  • Posts: 108
    • View Profile
    • Email
Re: Set OK button not to be the default
« Reply #1 on: January 25, 2012, 08:45:33 PM »
If you want code to run when a field is completed, AND when Save is pressed, then move it to the ValidateValue::field name routine.