Han
8 years agoAce
Jquery Uncaught TypeError
Hi all,
I'm trying to update the functionality for the print page functionality.
My code is:
<@liaAddScript>
;(function($){
<#-- print button to open in new window-->
$('.lia-component-forums-action-print-message').on('click', function(e) {
e.preventDefault();
window.open(this.href, "_blank", "toolbar=yes,top=0,left=0,width=800,height=600");
});
})(LITHIUM.jQuery);
</@liaAddScript>
But I am I currently getting an error saying:
lia-scripts-head-min.js:3 Uncaught TypeError: Cannot read property 'setAttribute' of null
at Object.init (lia-scripts-head-min.js:3)
at 1:1093
init @ lia-scripts-head-min.js:3
(anonymous) @ 1:1093
I have not added in a JQuery library, because it's my understanding that a version of the library is built into lithium.
Is there something I am missing?
Han As you can see from the error message, the error is not coming from you, it is coming from a native Lithium js file which you have no control over, e.g.
lia-scripts-head-min.js
so you might have to contact support about this...