Dragable Menu script still is not working.

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Rickstre
Beginner
Beginner
Posts: 6
Joined: Thu Nov 18, 2004 1:32 am

Dragable Menu script still is not working.

Post by Rickstre » Tue Dec 14, 2004 3:25 am

navbar_milonic.js.php:

Code: Select all

<?php
?><script type="text/javascript" src="/common/milonic_src.js"></script>	
<param copyright="JavaScript Menu by Milonic - http://www.milonic.com"></param>

<script	type="text/javascript">
<!-- 
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=/common/mmenuns4.js><\/scr"+"ipt>");		
  else _d.write("<scr"+"ipt language=JavaScript src=/common/mmenudom.js><\/scr"+"ipt>"); 
 -->
</script>

<script language=javascript>
<?php

include($_SERVER['DOCUMENT_ROOT']."/libs/navbars/menu_data.js.php"); 
	milonic_spewmenudatajs();
?>
</script>

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

<script language="JavaScript1.2" type="text/javascript" src="/common/preloadmenuimages.js"></script>
First portion of menu_data.js.php (documentation of draggable menus says type=header;dragable=1)

Code: Select all

<?php
// menu_data.js.php - milonic menu dyna javascript creator stuff
// changes: encapsulate the js generation code in a function, to avoid over-writing such global variables and things from included scripts.
	
function milonic_spewmenudatajs()
{
...
... (a bunch more of PHP code DB queries and variable definitions)
...
?>

_menuCloseDelay=500					// The time delay for menus to remain visible on mouse out
_menuOpenDelay=150 					// The time delay before menus open on mouse over
_subOffsetTop=2						// Sub menu top offset
_subOffsetLeft=-2						// Sub menu left offset

with(XPMainStyle=new mm_style()){
onbgcolor="#C1D2EE";
oncolor="#000080";
offbgcolor="transparent";
offcolor="#000080";
bordercolor="#8A867A";
borderstyle="solid";
borderwidth=1;
separatorcolor="#8A867A";
separatorpadding="2";
separatoralign="right";
separatorwidth="80%";
headercolor='#000080';
padding=5;
openonclick=<?=($click)?>;
fontsize="<?=($fontsize)?>%";
fontstyle="normal";
fontweight="normal";
fontfamily="Verdana,Helvitica,Tahoma";
image="/images/xpblank.gif";
subimage="/images/arrow.gif";
onborder="1px solid #316AC5";
menubgimage="/images/winxp.gif";
}


with(XPMenuStyle=new mm_style()){
onbgcolor="#C1D2EE";
oncolor="#000080";
offbgcolor="transparent";
offcolor="#000080";
bordercolor="#8A867A";
borderstyle="solid";
borderwidth=1;
separatorcolor="#8A867A";
separatorpadding="2";
separatoralign="right";
separatorwidth="80%";
headercolor='#000080';
padding=5;
openonclick=<?=($click)?>;
fontsize="<?=($fontsize)?>%";
fontstyle="normal";
fontweight="normal";
fontfamily="Verdana,Helvitica,Tahoma";
image="/images/xpblank.gif";
subimage="/images/arrow.gif";
onborder="1px solid #316AC5";
menubgimage="/images/winxp.gif";
}

// MAIN MENU

with(milonic=new menuname("Main Menu")){
style=XPMainStyle;
top=10;
left=<?=($left)?>;
alwaysvisible=1;
followscroll=<?=($scroll)?>;

itemwidth="<?=($itemwidth)?>px"
margin=2;

<?  // Header of Main Menu
?>

aI("text=&nbsp;<?=($authuser[FirstName])?>;fontweight=bold;type=header;dragable=1;headerbgcolor=#d6d6ce;image=/images/navbar_header.gif;separatorsize=1;");

<?  // Back to home,
?>
aI("text=Support Home;url=/techs/index.php;status=Go back to <?=($authuser[FirstName])?>'s Support Home page;image=/images/navbar_<?=$ts[nav_icon_home]?>.gif;separatorsize=1;");
...
...(more menu items)
...
}
drawMenus();

<?php } ?>
dragdrop.js is in /common/ and no PHP or JS errors ensue. Menu works correctly in all other ways...

Yet it does not drag... Any ideas?

Rick
Last edited by Rickstre on Wed Dec 15, 2004 1:44 pm, edited 2 times in total.

User avatar
Ruth
 Team
 Team
Posts: 8761
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth » Tue Dec 14, 2004 7:19 pm

Someone else just posted on this issue and the response was that the dragdrop file needed to be updated and this link was given http://www.milonic.net/dragdrop.js Hope that does it.

Ruth

Rickstre
Beginner
Beginner
Posts: 6
Joined: Thu Nov 18, 2004 1:32 am

Post by Rickstre » Tue Dec 14, 2004 11:14 pm

Yes... I saw that post. I downloaded the file and no change. Do you see anything in the code that could cause the problem?

Rick

User avatar
Ruth
 Team
 Team
Posts: 8761
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth » Wed Dec 15, 2004 3:37 am

I'm sorry, I don't know anything about coding. If you can change the title you might make it draggable still not working, and I'll see if I can notify someone.

Ruth

Rickstre
Beginner
Beginner
Posts: 6
Joined: Thu Nov 18, 2004 1:32 am

Post by Rickstre » Thu Dec 16, 2004 6:35 pm

I just fixed it myself by removing "type=header" and replacing it with type=dragable. Odd that the documentation does not seem to reflect this but rather seems to say that it MUST be a header.

Post Reply