Re: How to wire click event with argument when create input
- From: RobG <rgqld@xxxxxxxxxxxx>
- Date: Fri, 22 Jun 2007 01:56:00 -0700
On Jun 22, 5:10 pm, quoclinh <lequocl...@xxxxxxxxx> wrote:
Hi,[...]
I have the following function that works. It would create an input
that would invoke a click event that call a javascript function:
btn.onclick = execAction; //this works[...]
The question is, if I have an execAction function with an argument,
how do I change the code in createButton to accomodate it?
btn.onclick = function() {
execAction(arg1, arg2, ...);
}
Incidentally, if you want a function that fires when a form is
submitted, you are much better off to put it on the form's onsubmit
handler rather than the submit button's onclick handler.
--
Rob
.
- Follow-Ups:
- Re: How to wire click event with argument when create input
- From: quoclinh
- Re: How to wire click event with argument when create input
- References:
- How to wire click event with argument when create input
- From: quoclinh
- How to wire click event with argument when create input
- Prev by Date: Re: Multiple onload events in the bidy tag
- Next by Date: Re: Multiple onload events in the bidy tag
- Previous by thread: Re: How to wire click event with argument when create input
- Next by thread: Re: How to wire click event with argument when create input
- Index(es):
Relevant Pages
|