No js files will embed. Have tried all sorts of code

  • 1
  • Question
  • Updated 9 years ago
  • Answered
None of my .js files are working. They never load. Any idea what to do? This is starting to annoy me. I have been trying to embed anything with a .js file and still doesn't work.

Please help, thank you
-Dan

If you need me to share what code(s) i'm using just say so.
Photo of lambofgod

lambofgod

  • 875 Posts
  • 35 Reply Likes

Posted 9 years ago

  • 1
Photo of Ed-a-Torials @ Honey Bear Playhomes

Ed-a-Torials @ Honey Bear Playhomes, Champion

  • 2582 Posts
  • 279 Reply Likes
Who do you host your JS file with and are they having server problems may be the question you should ask. Only last week I had a problem with my hotlink host causing my site to fail to load in the site builder and published site due to the file being inaccessible because of the server being down at the host. I scrambled to get my files hosted on the YOLA servers with the PRO account and have been happily issue free since.

This code has always and even now works for me...

<script src="resources/YOURFILE.js" type="text/javascript"></script>

On a different note I have been having problems and a difficult time with a simple script that worked perfectly yesterday and beyond but after last night is a pain. The script is a code for the little bee that follows my cursor around. I updated my page, changed the image and edited the code on all but 2 of my pages before the issue arose and on those last two pages nothing that I can do makes the code work. I even used it to no avail on a newly created site.

<script type="text/javascript"> /* Simple Image Trail script- By JavaScriptKit.com Visit http://www.javascriptkit.com for this script and more This notice must stay intact */ var trailimage=["http://honeybearplayhomes/resources/s..., 50, 45] //image path, plus width and height var offsetfrommouse=[10,-20] //image x,y offsets from cursor position in pixels. Enter 0,0 for no offset var displayduration=0 //duration in seconds image should remain visible. 0 for always. if (document.getElementById || document.all) document.write('<div id="trailimageid" style="position:absolute;visibility:visible;left:0px;top:0px;width:1px;height:1px"><img src="'+trailimage[0]+'" border="0" width="'+trailimage[1]+'px" height="'+trailimage[2]+'px"></div>') function gettrailobj(){ if (document.getElementById) return document.getElementById("trailimageid").style else if (document.all) return document.all.trailimagid.style } function truebody(){ return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body } function hidetrail(){ gettrailobj().visibility="hidden" document.onmousemove="" } function followmouse(e){ var xcoord=offsetfrommouse[0] var ycoord=offsetfrommouse[1] if (typeof e != "undefined"){ xcoord+=e.pageX ycoord+=e.pageY } else if (typeof window.event !="undefined"){ xcoord+=truebody().scrollLeft+event.clientX ycoord+=truebody().scrollTop+event.clientY } var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15 var docheight=document.all? Math.max(truebody().scrollHeight, truebody().clientHeight) : Math.max(document.body.offsetHeight, window.innerHeight) if (xcoord+trailimage[1]+3>docwidth || ycoord+trailimage[2]> docheight) gettrailobj().display="none" else gettrailobj().display="" gettrailobj().left=xcoord+"px" gettrailobj().top=ycoord+"px" } document.onmousemove=followmouse if (displayduration>0) setTimeout("hidetrail()", displayduration*1000) </script>

Can someone test it on one of their sites for me? ;) Was there changes to the site builder lately that might affect script placed on pages I wonder?

Happy site building
Ed

You can find me with my head in the honey pot here...

Honey Bear Playhomes Tips and Favs in one place... A Honey bear Playhomes Tip ;)
Photo of diane

diane

  • 1238 Posts
  • 121 Reply Likes
You have a .com missing in your source for the gif; however, it still didn't work after fixing that part. I went to javascriptkit.com and got the code there and it worked fine. Not sure what else might be wrong.
Photo of Ed-a-Torials @ Honey Bear Playhomes

Ed-a-Torials @ Honey Bear Playhomes, Champion

  • 2582 Posts
  • 279 Reply Likes
LOL Thanks yeah forgot that when I was adding the full URL or so I thought LOL

The initial code had the "resources/small_bee_cursor.gif" and when I posted I added the rest but brain farted the .com

I copied it verbatim from a page with a fully functional cursor chasing bee. Tre bizarre... It should have functioned...

Hmmm interesting... I went to the notepad doc with the prepared code and pasted it into an HTML widget and it worked. Copied code from an HTML widget on a functional page and pasted it into a new HTML widget in a new page and it did not, Could there be an issue with the copy function in the site builder perhaps?
Photo of lambofgod

lambofgod

  • 875 Posts
  • 35 Reply Likes
Lol at this point Ed anything could be possible with the sitebuilder. It does seems a little buggy for me lately, could there be some problems with the Yola pro intergration?
Photo of lambofgod

lambofgod

  • 875 Posts
  • 35 Reply Likes
Hey Ed,

I am hosting my files with Yola, and with still no luck. Maybe I am working with the wrong file?
<!--
<style type="text/css">

.arrowlistmenu{
width: 180px; /*width of menu*/
}

.arrowlistmenu .headerbar{
font: bold 14px Arial;
color: white;
background: black url(resources/Site_Images/titlebar.png) repeat-x center left;
margin-bottom: 10px; /*bottom spacing between header and rest of content*/
text-transform: uppercase;
padding: 4px 0 4px 10px; /*header text is indented 10px*/
}

.arrowlistmenu ul{
list-style-type: none;
margin: 0;
padding: 0;
margin-bottom: 8px; /*bottom spacing between each UL and rest of content*/
}

.arrowlistmenu ul li{
padding-bottom: 2px; /*bottom spacing between menu items*/
}

.arrowlistmenu ul li a{
color: #A70303;
background: url(resources/Site_Images/arrowbullet.png) no-repeat center left; /*custom bullet list image*/
display: block;
padding: 2px 0;
padding-left: 19px; /*link text is indented 19px*/
text-decoration: none;
font-weight: bold;
border-bottom: 1px solid #dadada;
font-size: 90%;
}

.arrowlistmenu ul li a:visited{
color: #A70303;
}

.arrowlistmenu ul li a:hover{ /*hover state CSS*/
color: #A70303;
background-color: #F3F3F3;
}

</style>
<head>
<html>
<div class="arrowlistmenu"> <h3 class="headerbar">Newest Funny</h3> <ul> <li><a href="http://www.newestfunny.com/">Home&lt;...> <li><a href="http://www.newestfunny.com/funnypictu... Pictures</a></li> <li><a href="http://www.newestfunny.com/funnygifs.... Gifs</a></li> <li><a href="http://www.newestfunny.com/flashgames... Games</a></li> <li><a href="http://www.newestfunny.com/flashmovie... Movies</a></li> <li><a href="http://www.newestfunny.com/bestof.php... of YouTube</a></li> <li><a href="http://www.newestfunny.com/funnyvideo... Videos</a></li> <li><a href="http://www.newestfunny.com/mylife.php... Life Sucks</a></li> </ul> <h3 class="headerbar">Other Stuff</h3> <ul> <li><a href="http://www.newestfunny.com/topusers.p... Users</a></li> <li><a href="http://www.newestfunny.com/contactus.... Us</a></li> <li><a href="http://www.newestfunny.com/report.php... Bugs</a></li> <li><a href="http://www.newestfunny.com/suggestion...> <li><a href="http://www.newestfunny.com/howto.php"...> </ul> </div>
</head>
</html>

Maybe it should be something else? It is saved as a .js file. I tried css file with no luck and html files don't work with Yola.
Any suggestions?
-->

Also I tried out the code and nothing loaded or showed up for me.
Photo of diane

diane

  • 1238 Posts
  • 121 Reply Likes
The above code seems to work okay when I tried it -- it was a menu with black bars at the top and red links? Is that what it's supposed to be?
Photo of lambofgod

lambofgod

  • 875 Posts
  • 35 Reply Likes
Yes you are correct on what the menu looks like. I am now happy that I didn't miss any parts of the code and it displayed correctly for you. I am working on what to do for the file part. I will try a couple things and if any of them work, I will post here to hopefully help anyone else that has the same problem. Thank you for trying it out-Dan