[thelist] DW's MM_findObj function - variable confusion

David Prowak prowak at yahoo.com
Tue Dec 19 13:14:51 CST 2000


I've been trying to use Netscape's debugger to examine
the following code (clipped for brevity):

function MM_findObj(n, d)

    var p,i,x;
    if(!d) d=document;

The function MM_findObj is called using:

So, the 2nd variable to the function (MM_findObj)
which is "d", is not passed.  The line 
if (!d) d = document;
should then change "d" from null to the value of the

When I examine the variable "d" within the javascript
debugger, it's value, even after the above code is
executed, never changes.  I try to inspect the value
of "d" and it always null.
Why is this so?


Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.

More information about the thelist mailing list