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 - 06: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

    Hopeless Member

  • Moderators
  • 5,991 posts
  • LocationWA

Posted 20 October 2013 - 11:16 PM

Is it actually called "nonotifications"?
When in doubt, CHECK YOUR ERROR LOG

#3 NOurDeSiGNer

NOurDeSiGNer

    Newbie

  • New Members
  • Pip
  • 5 posts

Posted 22 October 2013 - 12:23 PM

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



#4 requinix

requinix

    Hopeless Member

  • Moderators
  • 5,991 posts
  • LocationWA

Posted 22 October 2013 - 01: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?
When in doubt, CHECK YOUR ERROR LOG

#5 NOurDeSiGNer

NOurDeSiGNer

    Newbie

  • New Members
  • Pip
  • 5 posts

Posted 28 October 2013 - 06: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

    Hopeless Member

  • Moderators
  • 5,991 posts
  • LocationWA

Posted 28 October 2013 - 07:15 PM

var notifs = YAHOO.util.Dom.get('nonotifications');
"nonotifications". Is that the actual name of whatever the thing is? Not just "notifications"?
When in doubt, CHECK YOUR ERROR LOG

#7 NOurDeSiGNer

NOurDeSiGNer

    Newbie

  • New Members
  • Pip
  • 5 posts

Posted 28 October 2013 - 07:54 PM

Yes "nonotifications" is the actual name in this file



#8 requinix

requinix

    Hopeless Member

  • Moderators
  • 5,991 posts
  • LocationWA

Posted 28 October 2013 - 08:42 PM

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?
When in doubt, CHECK YOUR ERROR LOG

#9 NOurDeSiGNer

NOurDeSiGNer

    Newbie

  • New Members
  • Pip
  • 5 posts

Posted 29 October 2013 - 03:35 PM

I did it it didn't return any thing

 

do you what the full code of the js file ?  



#10 requinix

requinix

    Hopeless Member

  • Moderators
  • 5,991 posts
  • LocationWA

Posted 29 October 2013 - 04:19 PM

As expected.

What is the HTML for the nonotifications thing? Maybe it's a DIV or SPAN?
When in doubt, CHECK YOUR ERROR LOG




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com