J
Julie Barnet
I just posted a question, but decided to make it clearer...sorry about
the re-post.
I am developing an asp.net page with 3 server side asp controls
(dropdownlist, textbox, button). I would like to capture the tab from
the dropdownlist to force a postback and then move focus to the
textbox.
I'm not sure if I'm doing this right, but here is my javascript
function:
The postback works fine (but should I be using the clientID, instead
of the server control name?) The focus will not work. When I press
tab it posts back and then focus is lost to all controls)
<script language="JavaScript1.1"><!--
function keyPressed(this_field, next_field) {
key=event.keyCode;
if (key==9)
{
__doPostBack(this_field,'');
document.all('next_field').Focus();
}
return false;
}
//--></script>
My dropdownlist has an attribute:
onKeyDown="keyPressed('cmbTest', 'txtTest')"
Any help would be greatly appricated!!
Julie Barnet
the re-post.
I am developing an asp.net page with 3 server side asp controls
(dropdownlist, textbox, button). I would like to capture the tab from
the dropdownlist to force a postback and then move focus to the
textbox.
I'm not sure if I'm doing this right, but here is my javascript
function:
The postback works fine (but should I be using the clientID, instead
of the server control name?) The focus will not work. When I press
tab it posts back and then focus is lost to all controls)
<script language="JavaScript1.1"><!--
function keyPressed(this_field, next_field) {
key=event.keyCode;
if (key==9)
{
__doPostBack(this_field,'');
document.all('next_field').Focus();
}
return false;
}
//--></script>
My dropdownlist has an attribute:
onKeyDown="keyPressed('cmbTest', 'txtTest')"
Any help would be greatly appricated!!
Julie Barnet