Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Aug 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help me.. Onclick event

    lease help me to make on event click like this



    <scripts>
    function checkData(noid){
    ................................
    }
    </scripts>




    <tr>
    <td>No ID<input size='4' name='noid' value=''><br />
    No ID<input size='4' name='status' value=''><br />


    <input class=button_content type=button name=submitButton value=Submit onclick=\"checkData(noid.value)\"/>
    </td>
    </tr>

    This scripts successfull working
    but today I want to add to Onclick event with 2 variable. in the above scripts only use :noid
    I want use noid and status

    how to change the script onclick=\"checkData(noid.value)\" and function checkData(noid)



    thank very much

    DON

  • #2
    Regular Coder
    Join Date
    Dec 2007
    Posts
    107
    Thanks
    0
    Thanked 3 Times in 3 Posts
    if you want to send multiple parameters to any javascript function then you can easily dot his by using semicolon(,) between the paramerters

    like this:
    Code:
    onclick=\"checkData(noid.value,status)\
    The actual javascript function must contain the same number of parameters in its definition

    Like this:

    Code:
     <scripts>
     function checkData(noid,status){
     ................................
     }
     </scripts>

    Hope this helpes you
    Programming & Webmaster Forum - AdSense Revenue Sharing forum


  •  

    Posting Permissions

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