Hi,
My external javascript test.js contains a variable definition var a =
"Hello,world!!" ;
I dynamically loaded the script test.js using the following fucntion:
function loadScript(url)
{
var e = document.create Element("script ");
e.src = url;
e.type="text/javascript";
document.getEle mentsByTagName( "head")[0].appendChild(e) ;
}
Function call : loadScript("tes t.js");
Now the problem is, though my script test.js gets loaded but I cannot
access the variable defined in the script.
Can anyone help me out ?
Regards,
Suvajit