Menu
Hi,
I have a custom toolbar in firefox which calls js functions from an external javascript file.
In the js file I declared a global variable:
var test;
function testfn1()
{
var test = event.innerHTML;
}
function testfn2()
{
var testing = test;
alert(testing);
}
I first call the function testfn1 when i click on a button on the toolbar and then when I click on another button on the toolbar, it calls testfn2. However I noticed that the function testfn2() alerts “undefined”. When I embed all this in the html page, it works fine; however in the external js it seems its not working.
any ideas?
Thanks