# Passing a javascript variable

**URL:** <https://forum.kirupa.com/t/passing-a-javascript-variable/225284>\
**Category:** flash\
**Created:** [May 10, 2007, 11:56am UTC](https://forum.kirupa.com/t/passing-a-javascript-variable/225284 "2007-05-10T11:56:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RubenFlash](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@RubenFlash](https://forum.kirupa.com/u/RubenFlash)\
**Post date:** [May 10, 2007, 11:56am UTC](https://forum.kirupa.com/t/passing-a-javascript-variable/225284/1 "2007-05-10T11:56:22Z")

</div>

Hi! 🍺

I have this Javascript function on my HTML…

```php

<script language="JavaScript" type="text/javascript">
function variaFunction(){
    var varia = "something";
    return varia;
}
</script>

```

… and the following code on flash…

```php

import flash.external.*;
cima.onRelease = function(){
    var varia = ExternalInterface.call("variaFunction");
    texto.text = varia;
    barra._x = varia - 18;
}

```

It works perfectly on FireFox, but it doesnt work on Internet Explorer. On IE when, the java function is executed, it passes a null value. Why??

Thanks!
