dorinp
Joined: 28 Jun 2008 Posts: 1
|
Posted: Sat Jun 28, 2008 5:29 pm Post subject: JS / "eval" function issue |
|
|
Hi,
Have you deal with this 'eval' function issue ?
In the js code below - variant a) work well but the b) is not working.
Have you any idea why? It's a JS bug ?
Thanks,
Dorin
//--------JS script----------
function test()
{
html_code = '<div id="mydiv"></div>';
document.write(html_code);
// variante a)
document.all.mydiv.innerHTML = '123';
//variant b)
eval('document.all.mydiv.innerHTML') = '123';
} |
|