NOurDeSiGNer Posted October 20, 2013 Share Posted October 20, 2013 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 Quote Link to comment https://forums.phpfreaks.com/topic/283134-uncaught-typeerror-cannot-set-property-innerhtml-of-null/ Share on other sites More sharing options...
requinix Posted October 21, 2013 Share Posted October 21, 2013 Is it actually called "nonotifications"? Quote Link to comment https://forums.phpfreaks.com/topic/283134-uncaught-typeerror-cannot-set-property-innerhtml-of-null/#findComment-1454707 Share on other sites More sharing options...
NOurDeSiGNer Posted October 22, 2013 Author Share Posted October 22, 2013 Uncaught TypeError: Cannot set property 'innerHTML' of null vbnotifications.js:42 Quote Link to comment https://forums.phpfreaks.com/topic/283134-uncaught-typeerror-cannot-set-property-innerhtml-of-null/#findComment-1454976 Share on other sites More sharing options...
requinix Posted October 22, 2013 Share Posted October 22, 2013 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? Quote Link to comment https://forums.phpfreaks.com/topic/283134-uncaught-typeerror-cannot-set-property-innerhtml-of-null/#findComment-1454984 Share on other sites More sharing options...
NOurDeSiGNer Posted October 28, 2013 Author Share Posted October 28, 2013 I Didn't understand you question , i'm not a developer .When I open the console in my website that's what it show Quote Link to comment https://forums.phpfreaks.com/topic/283134-uncaught-typeerror-cannot-set-property-innerhtml-of-null/#findComment-1455952 Share on other sites More sharing options...
requinix Posted October 29, 2013 Share Posted October 29, 2013 var notifs = YAHOO.util.Dom.get('nonotifications');"nonotifications". Is that the actual name of whatever the thing is? Not just "notifications"? Quote Link to comment https://forums.phpfreaks.com/topic/283134-uncaught-typeerror-cannot-set-property-innerhtml-of-null/#findComment-1455954 Share on other sites More sharing options...
NOurDeSiGNer Posted October 29, 2013 Author Share Posted October 29, 2013 Yes "nonotifications" is the actual name in this file Quote Link to comment https://forums.phpfreaks.com/topic/283134-uncaught-typeerror-cannot-set-property-innerhtml-of-null/#findComment-1455956 Share on other sites More sharing options...
requinix Posted October 29, 2013 Share Posted October 29, 2013 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? Quote Link to comment https://forums.phpfreaks.com/topic/283134-uncaught-typeerror-cannot-set-property-innerhtml-of-null/#findComment-1455966 Share on other sites More sharing options...
NOurDeSiGNer Posted October 29, 2013 Author Share Posted October 29, 2013 I did it it didn't return any thing do you what the full code of the js file ? Quote Link to comment https://forums.phpfreaks.com/topic/283134-uncaught-typeerror-cannot-set-property-innerhtml-of-null/#findComment-1456108 Share on other sites More sharing options...
requinix Posted October 29, 2013 Share Posted October 29, 2013 As expected. What is the HTML for the nonotifications thing? Maybe it's a DIV or SPAN? Quote Link to comment https://forums.phpfreaks.com/topic/283134-uncaught-typeerror-cannot-set-property-innerhtml-of-null/#findComment-1456117 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.