• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Noobie: Help with Javascript

Magicskrew

Weaksauce
Joined
Sep 25, 2009
Messages
89
Hey Guys,

I am new to javascript and was having a problem.

I am practicing my javascript with anylinkcssmenu (linked below)

http://www.dynamicdrive.com/dynamicindex1/anylinkcss.htm

and I can't seem to get it to work. I have the external .js / css files saved on my computer but it's like they aren't used for some reason at all.

The code I have is

<html>
<head>
<link rel="stylesheet" type="text/css" href="anylinkcssmenu.css" />

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

/***********************************************
* AnyLink CSS Menu script v2.0- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Project Page at http://www.dynamicdrive.com/dynamicindex1/anylinkcss.htm for full source code
***********************************************/

</script>

<script type="text/javascript">

//anylinkcssmenu.init("menu_anchors_class")
anylinkcssmenu.init("anchorclass")
</script>
</head>

<body>
<!--1st anchor link and menu -->

<p><a href="http://www.dynamicdrive.com" class="anchorclass" rel="submenu1">Default Example</a></p>

<div id="submenu1" class="anylinkcss">
<ul>
<li><a href="http://www.dynamicdrive.com/">Dynamic Drive</a></li>
<li><a href="http://www.cssdrive.com">CSS Drive</a></li>
<li><a href="http://www.javascriptkit.com">JavaScript Kit</a></li>
<li><a href="http://www.codingforums.com">Coding Forums</a></li>
<li><a href="http://www.javascriptkit.com/jsref/">JavaScript Reference</a></li>
</ul>
</div>

<!--2nd anchor link and menu -->

<p><a href="http://www.dynamicdrive.com" class="anchorclass someotherclass" rel="submenu2[click]" rev="lr">Right dropping menu</a> (click to reveal)</p>

<div id="submenu2" class="anylinkcss" style="width: 150px; background-color:#E9FECB">
<ul>
<li><a href="http://www.cnn.com/">CNN</a></li>
<li><a href="http://www.msnbc.com">MSNBC</a></li>
<li><a href="http://www.google.com">Google</a></li>
<li><a href="http://news.bbc.co.uk">BBC News</a></li>
</ul>
</div>

<!--3rd anchor link and menu -->

<p style="text-align:center"><a href="http://www.dynamicdrive.com" class="anchorclass myownclass" rel="submenu3">Menu with multiple columns</a></p>

<div id="submenu3" class="anylinkcsscols">

<div class="column">
<b>Web Development</b>
<ul>
<li><a href="http://www.dynamicdrive.com/">Dynamic Drive</a></li>
<li><a href="http://www.cssdrive.com">CSS Drive</a></li>
<li><a href="http://www.javascriptkit.com">JavaScript Kit</a></li>
<li><a href="http://www.codingforums.com">Coding Forums</a></li>
<li><a href="http://www.javascriptkit.com/domref/">DOM Reference</a></li>
</ul>
</div>

<div class="column">
<b>News Related</b>
<ul>
<li><a href="http://www.cnn.com/">CNN</a></li>
<li><a href="http://www.msnbc.com">MSNBC</a></li>
<li><a href="http://www.google.com">Google</a></li>
<li><a href="http://news.bbc.co.uk">BBC News</a></li>
</ul>
</div>

<div class="column">
<b>Technology</b>
<ul>
<li><a href="http://www.news.com/">News.com</a></li>
<li><a href="http://www.slashdot.com">SlashDot</a></li>
<li><a href="http://www.digg.com">Digg</a></li>
<li><a href="http://www.techcrunch.com">Tech Crunch</a></li>
</ul>
</div>

</div>

</body>
</html>

any help?
 
Is your HTML page in the same folder as the JS and CSS files?
 
Yes they are in the same folder.

Edit: Also, I tried putting this on my website and the same thing occurred. All the files are in the same folder.
 
Last edited:
The .js and .css files are not on the server, at least not where you link to them. Go to your site. In Firefox, view source, click the .js file, and you're greeted with a 404.
 
Back
Top