A lot depends upon the scenario.
A little javascript can be injected into a webpgae once it's loaded and set the focus to a text input element.
BUT the javascript needs to know what element you want to focus on.
Presumably the webpage is not one that you have written so you have no control over the HTML in that webpage?
If the webpage is well written (ie valid HTML) then the input element could be part of a form.
If the form has an id attribute and the text input within the form has a name attribute then you're in luck:
<script type="text/javascript">
document.forms.theFormId.theTextInputName.focus();
</script>
If the text input has an id attribute then:
<script type="text/javascript">
document.getElementById('theTextInputId').focus();
</script>
These will work BUT if at any time in the future the webpage is updated and the ids or names of elements change then the javascript will no longer work - that's beyond your control.
You can get all elements of type 'input' and iterate through them:
<script type="text/javascript">
var inputs=document.getElementsByTagName('input');
var i=inputs.length;
while(i--){
if(inputs[i].type=='text'){
// this is a text input
// if you can establish whether it's the one you want to focus then:
if(youWantToFocusOnThisInput){
inputs[i].focus();
break;
}
}
}
</script>
Can you post a link to the page which you want to load and set the focus on?
Martin.