[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: EVAL() -- is this a bug???
Is there a particular reason you're using eval? Seems to me could
accomplish the same thing by putting a variable (str) there instead.
I don't know if it is eval, but as eval crashes on Windows 3.1, I have taken
it out of everything I do. It is possible that the eval function is
terribly broken in other ways, but since the introduction of the crash bug
in a late beta of Netscape 2.0, I've seen its use dwindle.
-- Gordon
At 04:13 AM 3/7/96 EST, you wrote:
>If I execute the JS code below as it stands, it works correctly. However, if I
>comment out statements 3 and 4 and enable statements 1 and 2, the code opens a
>new window, but there is no document displayed in the window.
>
>Is this related to the bug described in Andy Augustine's FAQ, which indicates
>that EVAL strings are compiled into byte codes?
>
>Thanks.
>
>Bill
>====================================================================
><head>
><script language=javascript>
>
>function doit() {
> var str='drcr-frame.html';
> // eval('window.open("' + str + '","namer")'); // STATEMENT 1
> // eval('window.open("' + str + '","namer")'); // STATEMENT 2
> window.open("drcr-frame.html","namer"); // STATEMENT 3
> window.open("drcr-frame.html","namer"); // STATEMENT 4
>}
>
--------------------------------------------------------------------
For help about the list, please send a message to 'majordomo@obscure.org'
with the message body 'help'. To unsubscribe, send a message to
'majordomo@obscure.org' with the message body 'unsubscribe javascript'.
List archives and pointer to FAQ: http://www.obscure.org/javascript/