Join 2 Same Almost Same Function Into 1
function showRole(str,x) { if (str=='') { document.getElementById('txtHintrole'+x+'').innerHTML=''; return;
Solution 1:
I'm guessing you want to call two functions on onchange
. Try this:
newcell.childNodes[0].setAttribute("onchange",function(){
showUser(this.value,"+xx+");
secondFunction();
});
or since you tagged this jQuery, do it the jQuery way:
$(newcell.childNodes[0]).change(function(){
showUser(this.value,"+xx+");
secondFunction();
});
Post a Comment for "Join 2 Same Almost Same Function Into 1"