PDA

View Full Version : Help me.. Onclick event


donie_lo
08-22-2008, 05:04 AM
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, 07: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:

onclick=\"checkData(noid.value,status)\


The actual javascript function must contain the same number of parameters in its definition

Like this:


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



Hope this helpes you