Jump to content


Photo

Uncaught TypeError: Cannot set property 'innerHTML' of null


  • Please log in to reply
9 replies to this topic

#1 NOurDeSiGNer

NOurDeSiGNer

    Newbie

  • New Members
  • Pip
  • 5 posts

Posted 20 October 2013 - 11:16 PM

I got an error in chrome console : 
 
Uncaught TypeError: Cannot set property 'innerHTML' of null vbnotifications.js:42

this.init_page = function(enabled) {

		var notifs = YAHOO.util.Dom.get('nonotifications');

		if (this.legacy == 0) {
			notifs.innerHTML = '<a href="private.php">'
					+ vbphrase['dbtech_notifs_inbox'] + '</a>';
		} else {
			var notifmenu = YAHOO.util.Dom.get('dbtech_notifications_menu_wrapper');

			notifs.innerHTML = '';
			notifs.innerHTML = notifmenu.innerHTML;
		}

notifs.innerHTML = '<a href="private.php">' in this line 

 

 



#2 requinix

requinix

    Dark Administrator

  • Administrators
  • 7,770 posts
  • LocationWA

Posted 21 October 2013 - 04:16 AM

Is it actually called "nonotifications"?
Monkeys on typewriters may have a hard time writing Shakespeare, but they sure had no problem writing IP.Board.

#3 NOurDeSiGNer

NOurDeSiGNer

    Newbie

  • New Members
  • Pip
  • 5 posts

Posted 22 October 2013 - 05:23 PM

Uncaught TypeError: Cannot set property 'innerHTML' of null vbnotifications.js:42



#4 requinix

requinix

    Dark Administrator

  • Administrators
  • 7,770 posts
  • LocationWA

Posted 22 October 2013 - 06:05 PM

Congratulations, you figured out how to post the error message a second time. Copy and paste is amazing, isn't it?

I asked a question. Will you be answering it?
Monkeys on typewriters may have a hard time writing Shakespeare, but they sure had no problem writing IP.Board.

#5 NOurDeSiGNer

NOurDeSiGNer

    Newbie

  • New Members
  • Pip
  • 5 posts

Posted 28 October 2013 - 11:44 PM

I Didn't understand you question , i'm not a developer .
When I open the console in my website that's what it show 

 

console.jpg



#6 requinix

requinix

    Dark Administrator

  • Administrators
  • 7,770 posts
  • LocationWA

Posted 29 October 2013 - 12:15 AM

var notifs = YAHOO.util.Dom.get('nonotifications');
"nonotifications". Is that the actual name of whatever the thing is? Not just "notifications"?
Monkeys on typewriters may have a hard time writing Shakespeare, but they sure had no problem writing IP.Board.

#7 NOurDeSiGNer

NOurDeSiGNer

    Newbie

  • New Members
  • Pip
  • 5 posts

Posted 29 October 2013 - 12:54 AM

Yes "nonotifications" is the actual name in this file



#8 requinix

requinix

    Dark Administrator

  • Administrators
  • 7,770 posts
  • LocationWA

Posted 29 October 2013 - 01:42 AM

The problem is YAHOO.util.Dom.get('nonotifications') isn't locating an object.

Go to that page and open up a Javascript console (which Chrome, Firefox, and recent IE can do natively). Then execute
YAHOO.util.Dom.get('nonotifications')
What does it return?

And for the record, what is the HTML for that nonotifications thing?
Monkeys on typewriters may have a hard time writing Shakespeare, but they sure had no problem writing IP.Board.

#9 NOurDeSiGNer

NOurDeSiGNer

    Newbie

  • New Members
  • Pip
  • 5 posts

Posted 29 October 2013 - 08:35 PM

I did it it didn't return any thing

 

do you what the full code of the js file ?  



#10 requinix

requinix

    Dark Administrator

  • Administrators
  • 7,770 posts
  • LocationWA

Posted 29 October 2013 - 09:19 PM

As expected.

What is the HTML for the nonotifications thing? Maybe it's a DIV or SPAN?
Monkeys on typewriters may have a hard time writing Shakespeare, but they sure had no problem writing IP.Board.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users