# New to Kirupa and Flash.Need to convert this JS to AS

**URL:** <https://forum.kirupa.com/t/new-to-kirupa-and-flash-need-to-convert-this-js-to-as/197303>\
**Category:** flash\
**Created:** [August 15, 2006, 12:34pm UTC](https://forum.kirupa.com/t/new-to-kirupa-and-flash-need-to-convert-this-js-to-as/197303 "2006-08-15T12:34:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sathyguy](https://avatars.discourse-cdn.com/v4/letter/s/8baadc/32.png) [@sathyguy](https://forum.kirupa.com/u/sathyguy)\
**Post date:** [August 15, 2006, 12:34pm UTC](https://forum.kirupa.com/t/new-to-kirupa-and-flash-need-to-convert-this-js-to-as/197303/1 "2006-08-15T12:34:44Z")

</div>

Friends,  
we have purchased a template from template monster.  
The header flash is having a text box and a button for the site search.  
I want to add a site search script for the button click.  
I mean, the user will enter the search text in the text box and click the search button.  
then i want to write the below script (Note:here i have JavaScript i want this script to be converted to Action Script)

```auto
<script type="text/javascript">
var domainroot="www.mydomain.com"
function Gsitesearch(curobj){
curobj.q.value="site:"+domainroot+" "+curobj.qfront.value
}
</script>
 
<form action="http://www.google.com/search" method="get" onSubmit="Gsitesearch(this)">
<p>Site Search :<br />
<input name="q" type="hidden" />
<input name="qfront" type="text" style="width: 180px" /> <input type="submit" value="Search" /></p>
</form>

```

Currently i have written in flash file’s button click

```auto
on (release, keyPress "<Enter>") {
address = "http://www.google.com/search";
getURL(address);
}

```

but, the above one is just bringing the google search. i want, google to search my textbox.  
what i have to write in the button release?

Thanks & Regards  
Sathyguy
