Go to first Text box on content part of the page.

T

tshad

Is there a way to tell it to go to the first textbox on the page?

I would like the user to start off at the textbox on my page instead of
having to tab down through my meu to get to it or to have to use the mouse
to get there.

Same with the DataGrid. It would be nice to be able to go directly to the
first textbox in the row I am editing when I go into edit mode.

Thanks,

Tom
 
T

tshad

Saravana said:

That would work fine, except that the textbox I have

name="DataList1:_ctl2:DataGrid1:_ctl2:_ctl0"

This is part of the EditCommandColumn:

<asp:EditCommandColumn EditText="<img
src='..\images\Edit.png'border='0' id='textbox1'>" visible="true"
ButtonType="LinkButton"
UpdateText="<img src='..\images\update.png'
border='0'>" CancelText="<img src='..\images\Cancel.png' border='0'>" />

As you can see I tried to fix the problem by name it by id:
id='textbox1'

That doesn't show up, however when rendered.

Thanks,

Tom
 
G

gh0st54

hi

instead of document.getElementById(""Textbox1"").focus();
try
document.getElementById(""" +Textbox1.ClientId+""").focus();

from your code looks like you set the id of an image tag not the control
 

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

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top