CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   Java and JSP (http://www.codingforums.com/forumdisplay.php?f=54)
-   -   Help me.. Onclick event (http://www.codingforums.com/showthread.php?t=147181)

donie_lo 08-22-2008 04:04 AM

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

technica 08-22-2008 06:03 AM

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


All times are GMT +1. The time now is 08:14 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.