Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #12089

Re: Submitting a Form that has Control Events

From Mike Duffy <Use_guestbook_page@website.in.sig>
Newsgroups comp.lang.javascript
Subject Re: Submitting a Form that has Control Events
Date 2012-02-23 12:52 +0000
Organization Your Company
Message-ID <XnsA002502F4CF5Finvalidcom@94.75.214.39> (permalink)
References <9ghbk7hh8t3jbka7kmepejfnqng4vbjqgo@4ax.com>

Show all headers | View raw


Gene Wirchenko <genew@ocis.net> wrote in 
news:9ghbk7hh8t3jbka7kmepejfnqng4vbjqgo@4ax.com:

> 
>      I click Submit and...

You should either give us the url of the page or its source if it is not on 
the Internet. Better yet, a skeleton of just a few lines that does not work 
as you think it should.


> Sometimes, especially if the current control is one that has a
> validation rule, the function I have written for submitting does not
> get run. 

When you say "current", do you mean the form element which currently has 
focus? Does each form element have an "onBlur" validation function applied 
to it, or just onKeypress/onClick? Did you remember to return "true" in all 
of those functions when the form values are okay?

I see that you are sumitting with the button, but some people will press 
<Enter> to submit a form regardless of the instructions on the screen. So 
you should have "onKeypress" handlers for your checkboxes and "onClick" 
handlers for your text fields, etc.

-- 
http://pages.videotron.ca/duffym/index.htm

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Submitting a Form that has Control Events Gene Wirchenko <genew@ocis.net> - 2012-02-22 21:03 -0800
  Re: Submitting a Form that has Control Events Mike Duffy <Use_guestbook_page@website.in.sig> - 2012-02-23 12:52 +0000
    Re: Submitting a Form that has Control Events Gene Wirchenko <genew@ocis.net> - 2012-02-23 10:36 -0800
      Re: Submitting a Form that has Control Events Mike Duffy <Use_guestbook_page@website.in.sig> - 2012-02-23 23:41 +0000
        Re: Submitting a Form that has Control Events Gene Wirchenko <genew@ocis.net> - 2012-02-23 16:48 -0800
        Re: Submitting a Form that has Control Events Gene Wirchenko <genew@ocis.net> - 2012-02-23 17:00 -0800
          Re: Submitting a Form that has Control Events Mike Duffy <Use_guestbook_page@website.in.sig> - 2012-02-24 02:22 +0000
            Re: Submitting a Form that has Control Events Gene Wirchenko <genew@ocis.net> - 2012-02-23 18:35 -0800
              Re: Submitting a Form that has Control Events Mike Duffy <Use_guestbook_page@website.in.sig> - 2012-02-24 05:10 +0000
                Re: Submitting a Form that has Control Events Gene Wirchenko <genew@ocis.net> - 2012-02-24 09:43 -0800
          Re: Submitting a Form that has Control Events Mike Duffy <Use_guestbook_page@website.in.sig> - 2012-02-24 02:22 +0000

csiph-web