How to wrap a button click to initiate function

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
danjapro
Forum Commoner
Posts: 72
Joined: Mon Sep 27, 2004 10:56 am

How to wrap a button click to initiate function

Post by danjapro »

I ok with jQquery, I have been trying for hours on how to wrap a button click function to this.

There is a onclick function on button called 'SendTransferAction', but still need to wrap it in the specific button only called button-2.

Code: Select all


           function SendTransferAction(){
                 jQuery("#response").validate({
                    expression: "if (VAL) return true; else return false;",
                    message: "Please enter correct Capthcha Code"
                 });	
           }

User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: How to wrap a button click to initiate function

Post by requinix »

The best understanding I have so far for what you're trying to do is that the SendTransferAction function executes for multiple buttons but you only want it to execute for one particular "button-2" button. Is that right? Then why not just make only it call the function and not all the other buttons?
Post Reply