Iamcaptain Posted September 25, 2009 Share Posted September 25, 2009 Hello to all. First post here and in need of help.I want to load the twitter widget javascript only on the homepage because it sends errors on all other webpages (works fine on the homepage where i have the widget, so the error must be because it can't use the widget)i tried adding this if (document.getElementById("twitter_div")) { } i want to make the if statement say "if twitter div exists on page, run script, else, don't" in the header.tplhow can i do this using smarty code? please help me guys. Link to comment Share on other sites More sharing options...
Iamcaptain Posted September 25, 2009 Author Share Posted September 25, 2009 Message: 'document.getElementById(...)' is null or not an objectLine: 12Char: 3Code: 0URI: http://localhost/modules/twitter/blogger.jsthis is the error that you get when you look at the report in internet explorer 8. It happens on every page, except for the homepage (where the widget is) Link to comment Share on other sites More sharing options...
Recommended Posts