Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

undefined is null or not an object error

35 views
Skip to first unread message

Sanchit

unread,
Dec 10, 2008, 4:38:49 PM12/10/08
to
I am opening following page in Firefox and other browers

http://www.claystation.com/styles/cs_main/templates/newmenu.html

and its opening smoothly.

But In case of IE (7) , I am getting an error

undefined is null or not an object error
code : 0


I dont know what to do, As I want to use this menu in my Site. Please
help!

Anthony Jones

unread,
Dec 11, 2008, 4:14:41 AM12/11/08
to

"Sanchit" <sanchit...@gmail.com> wrote in message
news:40571d6c-f98e-4bb1...@d36g2000prf.googlegroups.com...

Looks like a bug in the jquery.bdc.ddmenu.js file. The init function
attempts to use the self variable before its assigned.

You are using Jquery 1.2.6 from the comments in the code this little chunk
of code can be deleted, it in turn was a work round for an earlier bug in
Jquery 1.2.3. Check first that you have the lattest bdc ddmenu code an
email the author that their workaround didn't work anyway.


--
Anthony Jones - MVP ASP/ASP.NET

David Mark

unread,
Dec 11, 2008, 4:54:47 AM12/11/08
to
On Dec 11, 4:14 am, "Anthony Jones" <AnthonyWJo...@yadayadayada.com>
wrote:
> "Sanchit" <sanchitgupt...@gmail.com> wrote in message

>
> news:40571d6c-f98e-4bb1...@d36g2000prf.googlegroups.com...
>
> >I am opening following page in Firefox and other browers
>
> >http://www.claystation.com/styles/cs_main/templates/newmenu.html
>
> > and its opening smoothly.
>
> > But In case of IE (7) , I am getting an error
>
> > undefined is null or not an object error
> > code : 0
>
> > I dont know what to do, As I want to use this menu in  my Site. Please
> > help!
>
> Looks like a bug in the jquery.bdc.ddmenu.js file.  The init function

What a shock.

> attempts to use the self variable before its assigned.
>
> You are using Jquery 1.2.6 from the comments in the code this little chunk
> of code can be deleted, it in turn was a work round for an earlier bug in

Then you lose the "benefit" of abdicating responsibility (e.g. you
might as well write your own menu script.) The jQuery core is full of
holes, so the same applies.

> Jquery 1.2.3.  Check first that you have the lattest bdc ddmenu code an
> email the author that their workaround didn't work anyway

The correct answer is to dump that ridiculous 50K of ill-conceived
rubbish and post future questions of this kind to
comp.lang.javascript.

Anthony Jones

unread,
Dec 11, 2008, 6:11:45 AM12/11/08
to
"David Mark" <dmark....@gmail.com> wrote in message
news:ce3d1265-92f7-453c...@g38g2000yqd.googlegroups.com...

>The correct answer is to dump that ridiculous 50K of ill-conceived
>rubbish and post future questions of this kind to
>comp.lang.javascript.

What alternative to JQuery is no your opinion the better option?

Sanchit

unread,
Dec 12, 2008, 7:44:16 AM12/12/08
to
On Dec 11, 2:14 pm, "Anthony Jones" <AnthonyWJo...@yadayadayada.com>
wrote:
> "Sanchit" <sanchitgupt...@gmail.com> wrote in message

is there a way to rectify this. The author of this menu email address
is not valid (his site is now no more up)

Anthony Jones

unread,
Dec 12, 2008, 11:54:35 AM12/12/08
to

"Sanchit" <sanchit...@gmail.com> wrote in message

news:e7b6d301-a8d1-486e...@r15g2000prd.googlegroups.com...


>On Dec 11, 2:14 pm, "Anthony Jones" <AnthonyWJo...@yadayadayada.com>
>wrote:
>>

>> Looks like a bug in the jquery.bdc.ddmenu.js file. The init function
>> attempts to use the self variable before its assigned.
>>
>> You are using Jquery 1.2.6 from the comments in the code this little
>> chunk
>> of code can be deleted, it in turn was a work round for an earlier bug in
>> Jquery 1.2.3. Check first that you have the lattest bdc ddmenu code an
>> email the author that their workaround didn't work anyway.
>

>is there a way to rectify this. The author of this menu email address
>is not valid (his site is now no more up)

Delete the offending little if statement from your copy of the file.

Sanchit

unread,
Dec 13, 2008, 8:31:57 AM12/13/08
to
On Dec 12, 9:54 pm, "Anthony Jones" <AnthonyWJo...@yadayadayada.com>
wrote:
> "Sanchit" <sanchitgupt...@gmail.com> wrote in message

Still it is giving another error..:(

Anthony Jones

unread,
Dec 13, 2008, 10:23:49 AM12/13/08
to

"Sanchit" <sanchit...@gmail.com> wrote in message
news:a0bb7f6e-7d3d-4ca2...@b41g2000pra.googlegroups.com...

>Still it is giving another error..:(

Then despite the fact that I find David's posts offensive, in this case he
is right. You should ditch this menu component and find another or build
one yourself. If there is no support or on going development for it then
you're on to a loser to keep with it.

JP B

unread,
Nov 16, 2009, 11:52:21 AM11/16/09
to
I came across this same error. The problem was in jquery.js at line 1120
for me

name = name.replace(/-([a-z])/ig, function(all, letter){
return letter.toUpperCase();
});
if ( set )
elem[ name ] = value;

return elem[ name ];
},

Add the following to the conditional and it should work.

if ( set && value != 'NaNpx' )
elem[ name ] = value;

If this doesn't work try using Microsofts Visual Web developers express
edition.
0) Set IE7 internet options -> advanced->script debugging on
1) Create a new blank web project in Visual Web ...
2) Click Play (the little gren arrow)
3) Type in the address of your website

*** Sent via Developersdex http://www.developersdex.com ***

0 new messages