hello I try to use anylink dropdown menu here is the example of the html
www.healthnfit.org/test/header.html
it works good alone as html page but when I use it as header for phpnuke it gives me errors in Internet Explorer
can someone help me please?
hello I try to use anylink dropdown menu here is the example of the html
www.healthnfit.org/test/header.html
it works good alone as html page but when I use it as header for phpnuke it gives me errors in Internet Explorer
can someone help me please?
You should probably make the script and style external files. Use this for the script file (you should probably keep the numbered entities, the forum editor converted them to characters):
Call it myanylink.js and put it in a folder, say:Code:/*********************************************** * AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com) * This notice MUST stay intact for legal use * Visit http://www.dynamicdrive.com/ for full source code ***********************************************/ //Contents for menu 1 var menu1=new Array() menu1[0]='<a href="http://www.healthnfit.org/modules.php?name=Forums&file=viewforum&f=4">מחקרים חדשים</a>' menu1[1]='<a href="http://www.healthnfit.org/modules.php?name=Forums&file=viewforum&f=1">תזונה בריאות ודיאטות</a>' menu1[2]='<a href="http://www.healthnfit.org/modules.php?name=Forums&file=viewforum&f=2">פתולוגיות ומחלות</a>' menu1[3]='<a href="http://www.healthnfit.org/modules.php?name=Forums&file=viewforum&f=3">רפואה נטורופטית</a>' menu1[4]='<a href="http://www.healthnfit.org/modules.php?name=Forums&file=viewforum&f=6">תוכניות אימונים וספורט</a>' menu1[5]='<a href="http://www.healthnfit.org/modules.php?name=Forums&file=viewforum&f=5">פורום כללי</a>' menu1[6]='<a href="http://www.healthnfit.org/modules.php?name=Forums&file=viewforum&f=7">תמונות הגולשים</a>' //Contents for menu 2, and so on var menu2=new Array() menu2[0]='<a href="http://www.healthnfit.org/modules.php?name=Content&pa=showpage&pid=5">מי אנחנו</a>' menu2[1]='<a href="http://healthnfit.org/models-healthnfit.htm">פינת הדוגמנים</a>' menu2[2]='<a href="http://healthnfit.org/diet.htm">פינת הרזייה וחיטוב</a>' menu2[3]='<a href="http://healthnfit.org/bodybuilding-of-HealthNfit.org.htm">פינת השרירנים</a>' menu2[4]='<a href="http://healthnfit.org/the-best.htm">מאמן האלופים</a>' menu2[5]='<a href="http://www.healthnfit.org/modules.php?name=Content&pa=showpage&pid=13">מכתבי תודה ממטופלים</a>' menu2[6]='<a href="http://www.healthnfit.org/modules.php?name=Content&pa=showpage&pid=15">המלצותיכם אודותינו</a>' var menu3=new Array() menu3[0]='<a href="http://www.healthnfit.org/clinic.htm">קליניקה לבריאות וכושר</a>' menu3[1]='<a href="http://www.healthnfit.org/personaltraining.htm">אימונים אישיים</a>' menu3[2]='<a href="http://www.healthnfit.org/seminar.htm">הרצאות וסמינרים</a>' menu3[3]='<a href="http://www.healthnfit.org/pegisha.htm">פגישת ייעוץ אישית</a>' menu3[4]='<a href="http://healthnfit.org/tofes.htm">הרשמה לייעוץ תזונה ואימונים</a>' menu3[5]='<a href="http://www.healthnfit.org/modules.php?name=Content&pa=showpage&pid=12">תמיכה בספורטאים</a>' var menu4=new Array() menu4[0]='<a href="http://www.healthnfit.org/modules.php?name=Content&pa=showpage&pid=7">כתבות ומאמרים</a>' menu4[1]='<a href="http://www.healthnfit.org/trainingnutrition/index.htm">תוכניות אימונים ותזונה</a>' menu4[2]='<a href="http://www.healthnfit.org/blood-test.html">בדיקות דם</a>' menu4[3]='<a href="http://www.healthnfit.org/modules.php?name=Content&pa=showpage&pid=4">אנטי אייגינג</a>' menu4[4]='<a href="http://www.healthnfit.org/kishorim/kishorim.html">קישורים שימושיים</a>' menu4[5]='<a href="http://www.healthnfit.org/kishorim3.htm">קישורים שימושיים 2</a>' var menu5=new Array() menu5[0]='<a href="http://www.healthnfit.org/cpg132">גלריית תמונות</a>' menu5[1]='<a href="http://www.healthnfit.org/galer">גלריית סרטים</a>' var menuwidth='165px' //default menu width var menubgcolor='lightpurple' //menu bgcolor var disappeardelay=250 //menu disappear speed onMouseout (in miliseconds) var hidemenu_onclick="yes" //hide menu when user clicks within menu? /////No further editting needed var ie4=document.all var ns6=document.getElementById&&!document.all if (ie4||ns6) document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>') function getposOffset(what, offsettype){ var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop; var parentEl=what.offsetParent; while (parentEl!=null){ totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop; parentEl=parentEl.offsetParent; } return totaloffset; } function showhide(obj, e, visible, hidden, menuwidth){ if (ie4||ns6) dropmenuobj.style.left=dropmenuobj.style.top="-500px" if (menuwidth!=""){ dropmenuobj.widthobj=dropmenuobj.style dropmenuobj.widthobj.width=menuwidth } if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover") obj.visibility=visible else if (e.type=="click") obj.visibility=hidden } function iecompattest(){ return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body } function clearbrowseredge(obj, whichedge){ var edgeoffset=0 if (whichedge=="rightedge"){ var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15 dropmenuobj.contentmeasure=dropmenuobj.offsetWidth if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure) edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth } else{ var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18 dropmenuobj.contentmeasure=dropmenuobj.offsetHeight if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up? edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either? edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge } } return edgeoffset } function populatemenu(what){ if (ie4||ns6) dropmenuobj.innerHTML=what.join("") } function dropdownmenu(obj, e, menucontents, menuwidth){ if (window.event) event.cancelBubble=true else if (e.stopPropagation) e.stopPropagation() clearhidemenu() dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv populatemenu(menucontents) if (ie4||ns6){ showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth) dropmenuobj.x=getposOffset(obj, "left") dropmenuobj.y=getposOffset(obj, "top") dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px" dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px" } return clickreturnvalue() } function clickreturnvalue(){ if (ie4||ns6) return false else return true } function contains_ns6(a, b) { while (b.parentNode) if ((b = b.parentNode) == a) return true; return false; } function dynamichide(e){ if (ie4&&!dropmenuobj.contains(e.toElement)) delayhidemenu() else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget)) delayhidemenu() } function hidemenu(e){ if (typeof dropmenuobj!="undefined"){ if (ie4||ns6) dropmenuobj.style.visibility="hidden" } } function delayhidemenu(){ if (ie4||ns6) delayhide=setTimeout("hidemenu()",disappeardelay) } function clearhidemenu(){ if (typeof delayhide!="undefined") clearTimeout(delayhide) } if (hidemenu_onclick=="yes") document.onclick=hidemenu
Replace it in the header file with:Code:http://www.healthnfit.org/scripts/
Make another file called myanylink.css with this in it:HTML Code:<script type="text/javascript" src="http://www.healthnfit.org/scripts/myanylink.js"> /*********************************************** * AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com) * This notice MUST stay intact for legal use * Visit http://www.dynamicdrive.com/ for full source code ***********************************************/ </script>
Put it in a folder:Code:#dropmenudiv{ border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; border-bottom:0px solid black; position:absolute; line-height:18px; z-index:100; font-style:normal; font-variant:normal; font-weight:normal; font-size:12px; font-family:Verdana } #dropmenudiv a{ width: 100%; display: block; text-indent: 3px; border-bottom: 1px solid black; padding: 3px 0; text-decoration: none; font-weight: bold; } #dropmenudiv a:hover{ /*hover background color*/ background-color: yellow; }
Replace it in the header file with:Code:http://www.healthnfit.org/style/
HTML Code:<link rel="stylesheet" href="http://www.healthnfit.org/style/myanylink.css" type="text/css">
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
I put the files in dropdown folder and linked to the right files
but now its not showing the menu even in html page
this is what I put in the header file:
<link rel="stylesheet" href="http://www.healthnfit.org/dropdown/myanylink.css" type="text/css">
<table class="bodyline" width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="center" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="60%" height="110" background="themes/phpib2/images/head_bg.gif">
<p dir="ltr"><a href="index.php"><img src="themes/phpib2/images/logo.jpg" border="0" alt="$sitename"></td>
<td width="40%" height="198" background="themes/phpib2/images/head_bg.gif">$showbanners </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#FFFFFF" background="themes/phpib2/images/cellpic1.gif"><table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td width="150" background="themes/phpib2/images/cellpic1.gif" nowrap><font class="content">$theuser</font></td>
<td nowrap><div align="center"><font class="content">
<script type="text/javascript" src="http://www.healthnfit.org/dropdown/myanylink.js">
/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
</script></font></div></td>
<td background="themes/phpib2/images/cellpic1.gif" width="150" nowrap><div align="center"><font class="content">
<script type="text/javascript">
<!-- // Array ofmonth Names
var monthNames = new Array( "ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר");
var now = new Date();
thisYear = now.getYear();
if(thisYear < 1900) {thisYear += 1900}; // corrections if Y2K display problem
document.write(now.getDate() + ", "+ monthNames[now.getMonth()] +" " + thisYear);
// -->
</script>
</font></div></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#FFFFFF"><img src="themes/phpib2/images/7px.gif" width="7" height="7"></td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center">
<tr valign="top">
<td>$public_msg<img src="themes/phpib2/images/pixel.gif" width="1" height="1" border="0" alt=""></td>
</tr></table>
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center">
<tr valign="top">
<td valign="top" width="1" background="themes/phpib2/images/7px.gif">
and what do you mean to keep numbered entitles? can you explain please?
thanks
Get rid of this junk:
from the myanylink.js file.Code:#2 Today, 09:57 PM jscheuer1 Mad Professor Join Date: Mar 2005 Location: SE PA USA Posts: 7,105 -------------------------------------------------------------------------------- You should probably make the script and style external files. Use this for the script file (you should probably keep the numbered entities, the forum editor converted them to characters): Code:
This:
should probably go right after this in the header file:HTML Code:<script type="text/javascript" src="http://www.healthnfit.org/dropdown/myanylink.js"> /*********************************************** * AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com) * This notice MUST stay intact for legal use * Visit http://www.dynamicdrive.com/ for full source code ***********************************************/ </script>
HTML Code:<link rel="stylesheet" href="http://www.healthnfit.org/dropdown/myanylink.css" type="text/css">
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
still not working
any guess why its not working?
now it doesnt have any errors anymore but cant see the menu?
this is the header file now:
http://www.healthnfit.org/header.html
and this are the scripts:
www.healthnfit.org/dropdown/myanylink.js
www.healthnfit.org/dropdown/myanylink.css
Last edited by Genom; 09-22-2006 at 06:45 AM.
Why did you take the menu's markup:
off of the header? Also, you should restore the number entities in the script and markup.HTML Code:<a href="http://www.healthnfit.org/index.php" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu1, '80px')" onMouseout="delayhidemenu()" style="text-decoration: none"> <font color="#000000">פורומים</font></a><font color="#0000FF"><span lang="en-us"> </span> </font>|<font color="#0000FF"><span lang="en-us"> </span></font> <a href="http://www.healthnfit.org/index.php" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu2, '80px')" onMouseout="delayhidemenu()" style="text-decoration: none"> <font color="#000000">מי אנחנו</font></a><font color="#0000FF"><span lang="en-us"> </span></font> |<font color="#0000FF"> </font><b><font color="#0000FF"> <span lang="en-us"> </span></font> <a href="http://www.healthnfit.org/index.php" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu3, '80px')" onMouseout="delayhidemenu()" style="text-decoration: none"> <font color="#008000">ייעוצים</font></a><font color="#0000FF"><span lang="en-us"> </span></font></b><font color="#0000FF"> </font>|<font color="#0000FF"><span lang="en-us"> </span> </font><a href="http://www.healthnfit.org/index.php" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu4, '110px')" onMouseout="delayhidemenu()" style="text-decoration: none"><font color="#000000">מאמרים וכתבות</font></a><font color="#0000FF"><span lang="en-us"> </span> </font>|<font color="#0000FF"> <span lang="en-us"> </span></font><a href="http://www.healthnfit.org/index.php" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu5, '80px')" onMouseout="delayhidemenu()" style="text-decoration: none"><font color="#000000">גלריות</font></a>
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
ok thanks now its working but when I use the menu you can see it only highlights the text how can I do that this yellow will highlight all the box like it needed to and that up and down the borders will go after the text and not only on the text if you know what I mean
and that it will go from right to left or that the inside text will be in the center
and what is number entities? english isnt my primary language
here is the example:
http://www.dynamicdrive.com/forums/a...1&d=1158917797
see the attachment
and I tried to fix it almost fix all the problems but now I tried to use it with phpnuke and its not working...
Last edited by Genom; 09-22-2006 at 10:55 AM.
ok I fixed all the problems but it still not working with phpnuke
this is the file
http://www.healthnfit.org/header.html
First, the numbered entities are like:
When I copied your code into the forum editor, it changed these entities into the characters that they represent, the same way that the browser does. But, they should be used in your code, not the characters themselves.Code:תזונה בר
I think that you are going to need to use these in the head of each page that uses the header as an include (take them off of the header file), ex:
Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <html dir="rtl"> <head> <title>Untitled Document</title> <link rel="stylesheet" href="http://www.healthnfit.org/dropdown/myanylink.css" type="text/css"> <script type="text/javascript" src="http://www.healthnfit.org/dropdown/myanylink.js"> /*********************************************** * AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com) * This notice MUST stay intact for legal use * Visit http://www.dynamicdrive.com/ for full source code ***********************************************/ </script> </head> <body> <? code for your include ?> other code for the body </body> </html>
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
the menu works good with characters too
and what about that new header page I didnt understand
and also how can I put it in everypage? to put it in the index.php?
I tried to put in the index.php
but then my site wont look good everything will be <center> and it will be a problem for me
is there any other way to fix this problem that it will work with phpnuke? I really need dropdown menu for my site
Bookmarks