hi to all good day.
how can i pass a parameter in a function?
what i want is i just want to pass a parameter in a function and call the function on my onkeypress of textbox.
i have this code and it seems won't work.
pls. help im very new in this thing..
thanks in advance guys..more power.PHP Code:<form>
<input type="textbox" name="textbox1" id="txttel" onkeypress="keydown(event,'txtname')">
<input type="textbox" id="txtname" onkeypress="keydown(event,'txtadd')">
<p>
<input type="textbox" id="txtadd" onkeypress="keydown(event,'txthome')">
<p>
<input type="textbox" id="txthome" >
</form>
<script>
document.getElementById("txttel").focus();
</script>
<script>
function keydown(e,var s){
if (!e) var e = window.event;
if (e.keyCode) code = e.keyCode;
else if (e.which) code = e.which;
if (code==13){
document.getElementById("s").focus();
}
}
</script>




Reply With Quote