By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,473 Members | 3,657 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,473 IT Pros & Developers. It's quick & easy.

can i pass multiple functions in onReset (form)

P: 30
Expand|Select|Wrap|Line Numbers
  1. <form action="?= $postUri ?>" method="post" onSubmit="return verifyInput();" onReset="setTimeout('toggleDHCP()',100) setFormDisabled(true);">
In this code - i want to pass multiple functions and its not working, if i pass only one function it works.

Can you help me how to do this?

Thanks
Oct 21 '08 #1
Share this Question
Share on Google+
3 Replies


Markus
Expert 5K+
P: 6,050
You have posted this question in the wrong forum. Please think about the question you are asking and then find the forum it is relevant to. In this case: Javascript.

--Moving to JS.
Oct 21 '08 #2

acoder
Expert Mod 15k+
P: 16,027
In this code - i want to pass multiple functions and its not working, if i pass only one function it works.
Use a semi-colon in between function calls.
Oct 21 '08 #3

P: 55
the easiest way imho is to set up a function to handle your multiple functions:

Expand|Select|Wrap|Line Numbers
  1. function ResetFunc(){
  2. toggleDHCP()
  3. theNextOne()
  4. someOtherFunc()
  5. }
so you'd change your onReset to
[HTML]
onReset= "ResetFunc()"[/HTML]

EDIT: to make a point, acoder has the right of it...that is the way you SHOULD do it. I add and edit functionality alot, so I like to keep any group calls ina nice tidy package so I have an easier time playing with them;)
Oct 21 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.