slight problem after update to version 5.735

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
wkilc
Super Advanced
Super Advanced
Posts: 60
Joined: Fri Sep 26, 2003 9:28 pm

slight problem after update to version 5.735

Post by wkilc »

Hi all,

A while back, Andy helped me tweak a electronic form that used the menu to dynamically generate "pseudo" pull-down menus in some blank text fields.

Has always worked fine... but when I update from 5.727 to the latest 5.735... the "pseudo" menu no longer works.

Scroll down and click (or tab) into any field under, let's say, "Instrument",:

Version 5.727:
http://rimea.org/forms/allstate/test1.html


Version 5.735:
http://rimea.org/forms/allstate/test2.html

A clue... IE says "mm_style is undefined" as the JS error. Menu still works fine with my main site menu, though... so it's gotta be something with the "pseudo" pull-down data file.

I will paste the "pseudo" menu data here:

Code: Select all

[size=9][color=darkred]var itemNum
function setText()
{
	currentCat=$tL(_m[getMenuByItem(_itemRef)][1])

	if(currentCat=="schools")
	{
		if(_mi[_itemRef][1]=="&nbsp")
		{
			document.forms['Simple']['School'+itemNum].value=""
		}
		else
		{
			document.forms['Simple']['School'+itemNum].value=_mi[_itemRef][1]
		}
	}
	if(currentCat=="grades")
	{
		if(_mi[_itemRef][1]=="&nbsp")
		{
			document.forms['Simple']['Grade'+itemNum].value=""
		}
		else
		{
			document.forms['Simple']['Grade'+itemNum].value=_mi[_itemRef][1]
		}
	}
	
	if(currentCat=="instruments")
	{
		if(_mi[_itemRef][1]=="&nbsp")
		{
			document.forms['Simple']['Instrument'+itemNum].value=""
		}
		else
		{
			document.forms['Simple']['Instrument'+itemNum].value=_mi[_itemRef][1]
		}
	}
	

	if(currentCat=="preferences")
	{
		if(_mi[_itemRef][1]=="&nbsp")
		{
			document.forms['Simple']['Preference'+itemNum].value=""
		}
		else
		{
			document.forms['Simple']['Preference'+itemNum].value=_mi[_itemRef][1]
		}
	}
	closeAllMenus()
}

_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=-1             // Sub menu top offset
_subOffsetLeft=0            // Sub menu left offset


with(menuStyle=new mm_style()){
oncolor="#ffffff"; 
offcolor="#000000"; 
onbgcolor="#316ac5"; 
offbgcolor="#ffffff"; 
bordercolor="#000000"; 
borderwidth=1; 
padding=2; 
fontsize="90%"; 
fontstyle="normal"; 
fontfamily="Verdana, Tahoma, Arial"; 
status=""; 
clickfunction="setText()";
borderwidth=1
}

with(new menuname("Schools")){
style=menuStyle;
overflow="scroll"
position="absolute"
aI("text=Aldrich JH");
aI("text=All Saints Academy");
aI("text=Bain MS");
aI("text=Barrington HS");
aI("text=Barrington MS");
aI("text=Bishop Hendricken");
aI("text=Broad Rock MS");
aI("text=Burrillville HS");
aI("text=Burrillville MS");
aI("text=Chariho HS");
aI("text=Chariho MS");
aI("text=Cranston-Johnston CRHS");
aI("text=Classical HS");
aI("text=Cole JH");
aI("text=Coventry HS");
aI("text=Cranston East");
aI("text=Cranston West");
aI("text= ");
}


with(new menuname("Grades")){
style=menuStyle;
top="offset=-15"
itemwidth=50
aI("text=6");
aI("text=7");
aI("text=8");
aI("text=9");
aI("text=10");
aI("text=11");
aI("text=12");
aI("text= ");
}


with(new menuname("Instruments")){
style=menuStyle;
overflow="scroll"
position="absolute"
aI("text=Jazz-Bass");
aI("text=Jazz-Drums");
aI("text=Jazz-Guitar");
aI("text=Jazz-Piano");
aI("text=Jazz-Saxophone-Alto");
aI("text=Jazz-Saxophone-Baritone");
aI("text=Jazz-Saxophone-Tenor");
aI("text=Jazz-Trombone");
aI("text=Jazz-Trumpet");
aI("text= ");
}

with(new menuname("Preferences")){
style=menuStyle;
top="offset=-15"
itemwidth=70
aI("text=Chorus");
aI("text=Band");
aI("text=Orchestra");
aI("text= ");
}
drawMenus()[/color][/size]
Thank you.

~Wayne
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Hi,

It looks like there are some problems with the files, when I look at http://rimea.org/new/java/milonic_src.js it contains some HTML code and not JavaScript.

Could these files be corrupt by any chance?

-- Andy
wkilc
Super Advanced
Super Advanced
Posts: 60
Joined: Fri Sep 26, 2003 9:28 pm

Post by wkilc »

AHA!!!

I am an idiot :oops: ... I've been coding too long... the path was invalid... works fine now.

Andy... can you please check out my other thread if you get a second:

viewtopic.php?t=6749

Thanks again!!!

~Wayne
wkilc
Super Advanced
Super Advanced
Posts: 60
Joined: Fri Sep 26, 2003 9:28 pm

Post by wkilc »

Whoops! Spoke to soon...

This page:
http://rimea.org/forms/allstate/test1.html

Using the latest script... still not working right... no JS errors.. and the menu eventually appears. It "flickers" in Firefox and then goes away.

Here's something... tabbing into the fields works fine... clicking does not.

Hmmm.

Thanks.

~Wayne
wkilc
Super Advanced
Super Advanced
Posts: 60
Joined: Fri Sep 26, 2003 9:28 pm

Post by wkilc »

bump... (sorry)

~Wayne
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Fixed

See post viewtopic.php?t=6774
Post Reply