Add javascript

Posted in: Newspaper
Post count: 68

I am trying to add javascript using the html element, but it doesn’t show on our site.
How do I add the javascript in the best way in Newspaper

Post count: 35449

Hi,

Please note that html element is only for html the javascript can be set in theme panel -> https://i.imgur.com/wUujVu8.png also in some cases you can set it in column text in text area -> https://i.imgur.com/CSPcls9.png

Hope this will help you!
Thank you!

Post count: 68

Hi Calin
Thank you for your quick reply once again.
Follow up: The text module won’t show the code.
So I tried the custom javascript.
I want to place the script in a banner type box in the side bar. How do I do that?

Here is the code:
<link rel=”stylesheet” type=”text/css” href=”http://hosted.stats.com/config/shsdefault.css”&gt;
<link rel=”stylesheet” type=”text/css” href=”http://knbr.stats.com/shs.css”&gt;
<link rel=”stylesheet” type=”text/css” href=”http://hosted.stats.com/config/nfldraftdefault.css”&gt;
<link rel=”stylesheet” type=”text/css” href=”http://knbr.stats.com/multi.css”&gt;
<link rel=”stylesheet” type=”text/css” href=”http://knbr.stats.com/nfldraft.css”&gt;
<script language=”javascript” SRC=”http://knbr.stats.com/multisport/draft.js.asp?sport=nfldraft&type=ontheclock&lang=en”></script&gt;

Post count: 35449

Hi,

As I know the css need to be loaded in head of website, also some javascripts need to be load in head and other javascrips at the end of body. So if I’m right your code need to be set like this -> https://i.imgur.com/v0g36f4.png
These need to be set in head
<link rel="stylesheet" type="text/css" href="http://hosted.stats.com/config/shsdefault.css">
<link rel="stylesheet" type="text/css" href="http://knbr.stats.com/shs.css">
<link rel="stylesheet" type="text/css" href="http://hosted.stats.com/config/nfldraftdefault.css">
<link rel="stylesheet" type="text/css" href="http://knbr.stats.com/multi.css">
<link rel="stylesheet" type="text/css" href="http://knbr.stats.com/nfldraft.css">

And these at the end of body ->
<script language="javascript" SRC="http://knbr.stats.com/multisport/draft.js.asp?sport=nfldraft&type=ontheclock&lang=en"></script>

Hope this will help you!
Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.