www.webdeveloper.com
Results 1 to 4 of 4

Thread: How to wrap a button click to initiate function

Hybrid View

  1. #1
    Join Date
    May 2006
    Posts
    28

    Red face How to wrap a button click to initiate function

    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:
               function SendTransferAction(){
                     jQuery("#response").validate({
                        expression: "if (VAL) return true; else return false;",
                        message: "Please enter correct Capthcha Code"
                     });	
               }

  2. #2
    Join Date
    Jul 2013
    Posts
    24
    Is this what your looking for
    [Code]<input type="button" onclick="sendtransferaction ()"; I'd="button2" value="button2">

  3. #3
    Join Date
    Jul 2013
    Posts
    24
    Is this what your looking for
    Code:
    <input type="button" onclick="sendtransferaction ()"; I'd="button2" value="button2">

  4. #4
    Join Date
    Oct 2007
    Location
    Western Massachusetts, USA
    Posts
    387
    HTML:
    Code:
    <input type="button" onclick="SendTransferAction()" value="Button 1" />
    <input type="button" value="Button 2" id="button2" />
    jQuery:
    Code:
    $("#button2").click(SendTransferAction);
    
               function SendTransferAction(){
                     jQuery("#response").validate({
                        expression: "if (VAL) return true; else return false;",
                        message: "Please enter correct Capthcha Code"
                     });	
               }
    Computer programmer / web developer.

Thread Information

Users Browsing this Thread

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

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