Hello Experts,
Currently I am writing a web application using vs.net 2002 with c#.
In a customer info page of the application, i have set the smart
navigation to true, so the application can go back to the same position
when postback occurs, and other reasons.
In the customer info page, when the user want to create a new customer
(user click the NEW button), i want the customer name textbox (first
field to enter) is on focus. Therefore the user dont have to hit tab all
the way the textbox. However, since smart nagviation is on, the last
click button (button NEW in this case) will set to focused, not the
customer name textbox i want.
my code is like this:
//c#
labelJavascript.Text =
"<script>setSelectFocus('customername');</script>";
// javascript
function setSelectFocus(field)
{
document.all[field].select();
document.all[field].focus();
}
can someone please tell me how can i overcome this problem?
thanks in advanced,
Benny
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!