• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 185
  • Last Modified:

How to use hidden buttons

I have an inputbox class and I want to be able to submit the information using the

myform.acceptbutton = myform.mybutton

Hitting the enter key automatically will submit the information, but it doesn't work when the button is hidden or not visible.  I was wondering if there was a way to use the button when it is hidden.  Thank you.
0
Nitinol
Asked:
Nitinol
  • 3
1 Solution
 
burakiewiczCommented:
Turn key preview on and You can check if the user hit the enter key and then call the buttonclick or method from there
like myform.mybutton.click();
0
 
NitinolAuthor Commented:
hmm...I'll get back to you and see if it works, thanks.
0
 
NitinolAuthor Commented:
nope, the events are not methods, so that won't work.  I might just work something out with the onkeypress event handler instead of using the button.  I need, however, to get a dialogue result.

further help would be much appreciated.
0
 
NitinolAuthor Commented:
I found an alternate solution using keypress event handler
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now