PDA

View Full Version : Anylink CCS top link doesn't work



jimboud
02-09-2006, 05:13 PM
My anylink css dropdown menu works properly, except the top link (the one that is NOT a submenu item) won't work unless there are no submenus listed.

The top item is enclosed in a <div>/<div>.

<script language="JavaScript">
<!--

function SymError()
{
return true;
}

window.onerror = SymError;

var SymRealWinOpen = window.open;

function SymWinOpen(url, name, attributes)
{
return (new Object());
}

window.open = SymWinOpen;

//-->
</script>

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

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

</script>
<style>

}

#box1 {
border: 1px solid #ffcc00;
background-color: #990900;
text-indent: 5px;
color: #FFFFFF;
width: auto;
margin-left: 170px;
margin-top: 15px;
height: 16px;
}

#box1 a:link {
text-decoration: none;
color: #FFFFFF;
font: bold 9pt/1.5 arial, sans-serif;
}

#box1 a:visited {
text-decoration: none;
color: #FFFFFF;
font: bold 9pt/1.5 arial, sans-serif;
}

#box1 a:hover {
color: #990900;
background-color: #FFFFFF;
}

.anylinkcss{
position:absolute;
visibility: hidden;
border:1px solid black;
border-bottom-width: 1px;
line-height: 16px;
z-index: 100;
background-color: #990900;
width: auto;
}

.anylinkcss a{
width: 100%;
border-top: 1px solid #ffff00;
display: block;
text-indent: 3px;
font:Arial, Helvetica, sans-serif;
font-size:10px;
color: #FFFFFF;
text-indent: 5px;
}

.anylinkcss a:hover{ /*hover background color*/
color: #990900;
background-color: #FFFFFF;
text-decoration: underline;
}

</style>

<div id="box1"><a href="about_us.php" onClick="return clickreturnvalue()" onMouseOver="dropdownmenu(this, event, 'anylinkmenu1')">About Us | </a>
<div id="anylinkmenu1" class="anylinkcss" style="width: 115px"> <a href="board.php">Board of Directors</a> <a href="committees.php">HFA Committees</a> <a href="programs.html">HFA Programs</a></div>

<a href="join_hfa.html">Join HFA </a> |

<a href="symposium_2006.html" onClick="return clickreturnvalue()" onMouseOver="dropdownmenu(this, event, 'anylinkmenu3')">Symposium</a> |
<div id="anylinkmenu3" class="anylinkcss" style="width: 150px"> <a href="symposium_2006.html">Symposium 2006</a><a href="symposium_recap.html">Symposium 2005 Recap</a></div>

</a><a href="advocacy.php" onClick="return clickreturnvalue()" onMouseOver="dropdownmenu(this, event, 'anylinkmenu7')">Advocacy</a> |
<div id="anylinkmenu7" class="anylinkcss" style="width: 180px"> <a href="advocacy_in_action.php">HFA Advocacy in Action </a> <a href="http://capwiz.com/hemophilia/home/">HFA Legislative Action Center</a></div>

</a><a href="news.php" onClick="return clickreturnvalue()" onMouseOver="dropdownmenu(this, event, 'anylinkmenu4')">News</a> |
<div id="anylinkmenu4" class="anylinkcss" style="width: 120px"> <a href="dateline_federation.php">Dateline Federation</a> <a href="legislative_news.php">Legislative News</a> <a href="industry_news.php">Industry News</a> <a href="scientific_news.php">Scientific News</a><a href="archives.php">Archives</a></div>

<a href="resources.html" onClick="return clickreturnvalue()" onMouseOver="dropdownmenu(this, event, 'anylinkmenu5')">Resources</a> |
<div id="anylinkmenu5" class="anylinkcss" style="width: 180px"><a href="http://capwiz.com/hemophilia/home/">HFA Legislative Action Center</a><a href="hcl_master.php">Home Care Providers</a><a href="ml_master.php">Manufacturers</a><a href="camps_master.php">Hemophilia Camps</a><a href="scholarships.php">Scholarships</a><a href="youth.html">Youth Opportunities</a></div>

<a href="links.html" onClick="return clickreturnvalue()" onMouseOver="dropdownmenu(this, event, 'anylinkmenu6')">Links</a> |
<div id="anylinkmenu6" class="anylinkcss" style="width: 110px"> <a href="links_national.html">Around the World</a> <a href="mailing_lists.php">Mailing Lists</a> <a href="providers.html">Industry Links</a> </div>

<a href="contact_us.php">Contact Us</a></div></div>

-------------------------
It seems the links enclosed in the #box1 don't work. Does anyone have any suggestions? Many thanks!

jscheuer1
02-09-2006, 07:03 PM
That is the default behavior of the script. In non-javascript enabled browsers, those top links will work (though the drop downs, of course, will not). This is a good arrangement in most cases. However, if you want them to work for all users, edit this:


var enableanchorlink=0 //Enable or disable the anchor link when clicked on? (1=e, 0=d)

at the top of anylink.js

jimboud
02-10-2006, 08:23 PM
Changing the anylink.js file as you suggest works! I changed the "0" to "1" and the top "anchor" links work as you say. THANKS!........jimboud:)