# Input Text Box Auto Selected in HTML page

**URL:** <https://forum.kirupa.com/t/input-text-box-auto-selected-in-html-page/186015>\
**Category:** flash\
**Created:** [April 18, 2006, 1:26pm UTC](https://forum.kirupa.com/t/input-text-box-auto-selected-in-html-page/186015 "2006-04-18T13:26:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![NS05](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ns05/32/2205_2.png) [@NS05](https://forum.kirupa.com/u/NS05)\
**Post date:** [April 18, 2006, 1:26pm UTC](https://forum.kirupa.com/t/input-text-box-auto-selected-in-html-page/186015/1 "2006-04-18T13:26:06Z")

</div>

Hello,

I have a form and I need the first Input Text Box to be automatically selected when the user goes to the page.

I got this code and put it in but I am still have problems  
Use this in the frame that holds the textbox:  
**Selection.setFocus(“textboxname”);**  
The name has to be in quotes.

When I put that code in and tested the movie it worked great but once I put it into an html page it doesnt work anymore. The text in the input box is still selected but it isnt on focus so the user still has to click in the text box to input the text. Is there a way around this?

Thanks!!!

–I am using Flash 8

---

<div class="post-metadata">

**Author:** ![nathan99](https://avatars.discourse-cdn.com/v4/letter/n/96bed5/32.png) [@nathan99](https://forum.kirupa.com/u/nathan99)\
**Post date:** [April 18, 2006, 11:10pm UTC](https://forum.kirupa.com/t/input-text-box-auto-selected-in-html-page/186015/2 "2006-04-18T23:10:53Z")

</div>

yeah, you will probably have to put the focus to the flash movie then to the text area, so in the HEAD tag of your html put

```auto

<script language="javascript" type="text/javascript">
document.getElementById("Flash_files_ID").focus();
</script>

```

then to your flash

```auto

myInt=setInterval(function(){
Selection.setFocus("textboxname");
}, 500);

```

so what i have done is used js to set the focus of the flash movie, then after 500 ms i have told the flash movie to then set the focus… hope it works, though I do not know if it works, get back to us:D
