jscript bug (scope within "with" statement and eval) IE6, IE7

Discussion in 'Internet Explorer' started by ruv, Mar 29, 2006.

  1. ruv

    ruv Guest

    Hello!

    A following code must output "o-test-name":

    o = new Object(); o.name1 = "o-test-name";
    with( o ) { function test(s){ eval(s) }; test("alert(name1)") };

    it is work fine in the Mozilla/Firefox, but raise exception "'name1' is
    undefined"
    in the Microsoft Javascript realisation (Windows Script Host, IE6, IE7).

    Please, assure, is'n it?
     
    ruv, Mar 29, 2006
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.