I have a Javascript that when i write in one textbox, it fills another textbox. But i need that the focus stay in a third textbox.
Actually, my code is:
<script type="text/javascript" language="javascript">
function SelectValue(source, eventArgs) {
document.getElementById('<%= txtCodeProduct.ClientID %>').value = eventArgs.get_value();
document.getElementById('<%= txtQuantity.ClientID %>').focus();
}
</script>
but the focus don’t work…If i put an alert in a code, the focus work:
<script type="text/javascript" language="javascript">
function SelectValue(source, eventArgs) {
document.getElementById('<%= txtCodeProduct.ClientID %>').value = eventArgs.get_value();
document.getElementById('<%= txtQuantity.ClientID %>').focus();
alert("test");
}
How i resolve this without use alert ?
My textbox are in a form that uses update panel.
Thanks.
Try: