Click here to Skip to main content
15,867,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can I add onkeyup/onfocus/onchange in the codes like

UpdatePckTypeValue.setAttribute("onclick", "CalculateUpdateAmount()");
Posted
Comments
Snesh Prajapati 1-Apr-14 5:23am    
onclick event is not working?

VB
btnSubmit.Attributes.Add("onclick", "return checkSubmission()")
       txtHeadQuantity_1.Attributes.Add("onblur", "return IsNumber(this,this.value)")
       txtHeadQuantity_1.Attributes.Add("onfocus", "saveValue(this.value)")
       'txtH<pre lang="c#">
eadWeight_1.Attributes.Add("onblur", "return IsNumberDecimal(this,this.value)")
'txtHeadTemp_1.Attributes.Add("onblur", "return IsNumberDecimal(this,this.value)")
txtROTNumber.Attributes.Add("onchange", "checkNumberExit(this,this.value)")
txtShippingRef.Attributes.Add("onblur", "return CheckShippingRefNumber(this,this.value)")
 
Share this answer
 
if your server side control then use like this

$(document).ready(function(){

var controlid='#'+'&lt;%=Control.ClientID %&gt;';


$(controlid).click(function(){});


$(controlid).change(function(){});

});



if client side ( html control) use line this


$(document).ready(function(){

$('#Controlid').click(function(){});


$('#Controlid').change(function(){});

});
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900