It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

JS / "eval" function issue

JS / "eval" function issue

Postby dorinp on Sat Jun 28, 2008 4:29 pm

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';
}
dorinp
 
Posts: 0
Joined: Sat Jun 28, 2008 4:14 pm

Who is online

Users browsing this forum: No registered users and 2 guests