Hi There,
Apologies is this is another stupid newbie query, but I have been searching the web for about an hour and can not find anything to help me out - did find lots of interesting ASP .NET stuff though, so not a waste of time!!
I have a textbox on a webform that has some text placed into it on the page_load event. There is also a button on the form and when I click the button I want to set the focus to the textbox which has the required text already shown on the page.
I do this using a Javascript function :-document.getElementById('control ID').focus()
This works fine but when the control receives the focus, the cursor is placed at the start (i.e. left hand side) of the text that is already in the textbox and I would really like it to be at the end (i.e. right hand side of the text.
Am I misisng something completely obvious? - I suppose I am looking for something similiar to the VB .NET sendkeys function. Thinking about it I suppose that the Javascript function does not know anything about the text that is in the control!
Thanks for your assistance.
Apologies is this is another stupid newbie query, but I have been searching the web for about an hour and can not find anything to help me out - did find lots of interesting ASP .NET stuff though, so not a waste of time!!
I have a textbox on a webform that has some text placed into it on the page_load event. There is also a button on the form and when I click the button I want to set the focus to the textbox which has the required text already shown on the page.
I do this using a Javascript function :-document.getElementById('control ID').focus()
This works fine but when the control receives the focus, the cursor is placed at the start (i.e. left hand side) of the text that is already in the textbox and I would really like it to be at the end (i.e. right hand side of the text.
Am I misisng something completely obvious? - I suppose I am looking for something similiar to the VB .NET sendkeys function. Thinking about it I suppose that the Javascript function does not know anything about the text that is in the control!
Thanks for your assistance.