www.webdeveloper.com
Results 1 to 2 of 2

Thread: attaching onsubmit function

  1. #1
    Join Date
    Feb 2011
    Posts
    90

    attaching onsubmit function

    if I attach function to a form, for the event 'onsubmit' and that form already have function attached to it to the event onsubmit, will the new function cancelled the old or will it execute both function serially?

  2. #2
    Join Date
    Jun 2012
    Location
    Dark Side of the Moon
    Posts
    70
    You can set an event to call more than one function like so:

    onclick="func1();func2();"

    fun1 will be called, executed, then move on to func2, so you can do something like this. I believe otherwise it will depend on how you set it up. If you have an event on a submit button, that will pop first, since that is the caller of the event, then the form event since that is on the block and not the button. Hope this helps.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles