Setting focus to a textbox

N

Nick S

When I validate data in a field, the form does a postback - and focus goes
back to the first control. How do I change focus to a different textbox. I
though texbox.focus or textbox.setfocus - but neither of these work...

Thanks
 
R

Rob Meade

...
When I validate data in a field, the form does a postback - and focus goes
back to the first control. How do I change focus to a different textbox. I
though texbox.focus or textbox.setfocus - but neither of these work...

Hi Nick,

You *could* spit out a scriptblock and write a javascript function to the
page in the focus'ing the control of your choice, you'd need to write an
"onload" attribute/value to the BODY tag also...

Hope this helps..

Regards

Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,807
Latest member
ryef

Latest Threads

Top