Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old July 17th, 2002, 09:42 PM
reeljustice reeljustice is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Posts: 13 reeljustice User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to reeljustice
Size conflict dropdown menu and phpBB2

I added a javascript dropdown menu to my board recently. It impacted the display of the board. Without the js menu, the board adjusts fine to an 800 x 600 resolution. With the js menu, those using 800 x 600 must scroll across the screen to see the ful messages.

It would appear to me that there is some conflict between the js menu and the phpBB2 templates.

I've read the threads relative to resizing, but, don't know for sure where to begin relative to this conflict. Below are the scripts and the css for the js menu.

You can see the problem firsthand here: http://www.coastaloutdoors.com/phpB...topic.php?t=755

Your help is appreciated.

<-- dropdown.css -->
Code:
table.menu	{
	position: absolute;
	border: 1px solid black;
	cursor: pointer;
	visibility: hidden;
}
#mainmenu	{
	position: static;
}
table.menu td	{
	color: #FFFFFF;            /* Must be the same as tdColor in the menu_script.js */
	background-color: #993366; /* Must be the same as tdBgColor in the menu_script.js */
	border: 0px;
	padding: 0px 8px 2px;
	font-family: Arial;
	font-size: 8pt;
	white-space: nowrap;
}


<--menu_script.js -->
Code:
////////////////////Please leave this notice////////////////////
//
//	DropDown Menu 1.0
//	By Evgeny Novikov (java@aladin.ru)
//	http://java.skyteam.ru
//	It works only with IE5.0(++) and Netscape6.0(++)
//	Free to use!
//
////////////////////Last modified 2002-03-05////////////////////

//	Modify following four lines to customize your menu
var tdColor="#FFFFFF";		// menu item text color
var tdBgColor="#993366";	// menu item background color
var hlColor="#000000";		// highlight text color
var hlBgColor="#FFFFBB";	// highlight background color
//	After change, modify same values in your *.css file

var md=250;
var ti=-1;
var oTd=new Object;
oTd=null;

function doMenu(td){
	clearTimeout(ti);
	td.style.backgroundColor=hlBgColor;
	td.style.color=hlColor;
	var i;
	var sT="";
	var tda=new Array();
	tda=td.id.split("_");
	if(oTd!=null){
		var tdo=new Array();
		tdo=oTd.id.split("_");
		for(i=1;i<tdo.length;i++){
			sT+="_"+tdo[i];
			if(tdo[i]!=tda[i]){
				document.getElementById("td"+sT).style.backgroundColor=tdBgColor;
				document.getElementById("td"+sT).style.color=tdColor;
				if(document.getElementById("tbl"+sT)!=null)
					document.getElementById("tbl"+sT).style.visibility="hidden";
			}
		}			
	}
	oTd=td;
	sT="tbl";
	for(i=1;i<tda.length;i++)
		sT+="_"+tda[i];
	if(document.getElementById(sT)!=null)
		document.getElementById(sT).style.visibility="visible";

}

function clearMenu(){
	if(oTd!=null){
		var tdo=new Array();
		tdo=oTd.id.split("_");
		var sT="";
		for(var i=1;i<tdo.length;i++){
			sT+="_"+tdo[i];
			document.getElementById("td"+sT).style.backgroundColor=tdBgColor;
			document.getElementById("td"+sT).style.color=tdColor;
			if(document.getElementById("tbl"+sT)!=null)
				document.getElementById("tbl"+sT).style.visibility="hidden";
		}
		oTd=null;			
	}
}

function runMenu(strURL){
	location.href=strURL;
}

var tt="";
var sT="";
var pT=new Array();
var tA=new Array();

function getCoord(st){
	tA=st.split("_");
	if(tA.length>2){
		tA=tA.slice(0,-1);
		tt=tA.join("_");
		return (document.getElementById("tbl"+tt).offsetTop+document.getElementById("td"+st).offsetTop+4)+"px;left:"+
			(document.getElementById("tbl"+tt).offsetLeft+document.getElementById("td"+st).offsetWidth-2)+"px\">";
	}
	return (document.getElementById("mainmenu").offsetTop+document.getElementById("td"+st).offsetHeight-2)+"px;left:"+
		  (document.getElementById("mainmenu").offsetLeft+document.getElementById("td"+st).offsetLeft+5)+"px\">";
}

var sH="<table class=\"menu\" id=\"mainmenu\" cellspacing=\"0\"><tr>";
var p=0;
var j=0;
while(eval("typeof(td_"+ ++j +")!=\"undefined\"")){
	sH+="<td id=\"td_"+j+"\" onmouseover=\"doMenu(this)\" onmouseout=\"ti=setTimeout('clearMenu()',md)\"";
	sH+=(eval("typeof(url_"+j+")!=\"undefined\""))?" onclick=\"runMenu('"+eval("url_"+j)+"')\">":">";
	sH+=eval("td_"+j)+"</td>";
	if (eval("typeof(td_"+j+"_1)!=\"undefined\""))
		pT[p++]="_"+j;
}
sH+="</tr></table>";
document.write(sH);
for(var q=0;typeof(pT[q])!="undefined";q++){
	sT=pT[q];
	sH="";
	j=0;
	sH+="<table class=\"menu\" id=\"tbl"+sT+"\" cellspacing=\"0\" style=\"top:"+getCoord(sT);
	while (eval("typeof(td"+sT+"_"+ ++j +")!=\"undefined\"")){
		sH+="<tr><td id=\"td"+sT+"_"+j+"\" onmouseover=\"doMenu(this)\" onmouseout=\"ti=setTimeout('clearMenu()',md)\"";
		sH+=(eval("typeof(url"+sT+"_"+j+")!=\"undefined\""))?" onclick=\"runMenu('"+eval("url"+sT+"_"+j)+"')\">":">";
		sH+=eval("td"+sT+"_"+j)+"</td></tr>";
		if (eval("typeof(td"+sT+"_"+j+"_1)!=\"undefined\""))
			pT[p++]=sT+"_"+j;
	}
	sH+="</table>";
	document.write(sH);
}
document.getElementById("mainmenu").style.visibility="visible";


<-- menu_data.js -->
Code:
td_1 = "Home Page"
url_1 = "http://www.coastaloutdoors.com/index.html"
td_2 = "Go Fish Info"
td_3 = "Conditions/Forecast"
td_2_1 = "Message Boards"
td_2_1_1 = "All Message Boards"
td_2_1_2 = "General Message Board"
td_2_1_3 = "Buy-Sell-Swap-Trade"
td_2_1_4 = "Trade a Trip"
td_2_1_5 = "Ladies Only"
td_2_1_6 = "Diving the Coast"
td_2_1_7 = "Boating Questions"
td_2_1_8 = "Gear & Tackle"
url_2_1_1 = "http://www.coastaloutdoors.com/phpBB/index.php"
url_2_1_2 = "http://www.coastaloutdoors.com/phpBB/viewforum.php?f=3"
url_2_1_3 = "http://www.coastaloutdoors.com/phpBB/viewforum.php?f=8"
url_2_1_4 = "http://www.coastaloutdoors.com/phpBB/viewforum.php?f=8"
url_2_1_5 = "http://www.coastaloutdoors.com/phpBB/viewforum.php?f=2"
url_2_1_6 = "http://www.coastaloutdoors.com/phpBB/viewforum.php?f=14"
url_2_1_7 = "http://www.coastaloutdoors.com/phpBB/viewforum.php?f=5"
url_2_1_8 = "http://www.coastaloutdoors.com/phpBB/viewforum.php?f=7"
td_2_2 = "Captains/Facilities"
td_2_2_1 = "Charter Captains/Guides"
td_2_2_2 = "Facilities/Marinas"
td_2_2_3 = "Subcategory B3"
url_2_2_1 = "http://www.coastaloutdoors.com/guides/cohome.htm"
url_2_2_2 = "http://www.coastaloutdoors.com/facilities/Marina.htm"
url_2_2_3 = "dropdowntest.htm"
td_2_3 = "Tides and Coordinates"
td_2_3_1 = "Tides"
td_2_3_2 = "Fishing Coordinates"
td_2_3_3 = "Subcategory C3"
td_2_3_4 = "Subcategory C4"
td_2_3_5 = "Subcategory C5"
url_2_3_1 = "http://www.coastaloutdoors.com/tides/2002/Tides2002.htm"
url_2_3_2 = "http://www.coastaloutdoors.com/reefs/cohome.htm"
url_2_3_3 = "dropdowntest.htm"
url_2_3_4 = "dropdowntest.htm"
url_2_3_5 = "dropdowntest.htm"
td_2_4 = "Category D"
td_2_4_1 = "Subcategory D1"
td_2_4_2 = "Subcategory D2"
td_2_4_3 = "Subcategory D3"
td_2_4_4 = "Subcategory D4"
td_2_4_5 = "Subcategory D5"
td_2_4_6 = "Subcategory D6"
td_2_4_7 = "Subcategory D7"
url_2_4_1 = "dropdowntest.htm"
url_2_4_2 = "dropdowntest.htm"
url_2_4_3 = "dropdowntest.htm"
url_2_4_4 = "dropdowntest.htm"
url_2_4_5 = "dropdowntest.htm"
url_2_4_6 = "dropdowntest.htm"
url_2_4_7 = "dropdowntest.htm"
td_2_5 = "Category E"
td_2_5_1 = "Subcategory E1"
td_2_5_2 = "Subcategory E2"
td_2_5_3 = "Subcategory E3"
td_2_5_4 = "Subcategory E4"
td_2_5_5 = "Subcategory E5"
url_2_5_1 = "dropdowntest.htm"
url_2_5_2 = "dropdowntest.htm"
url_2_5_3 = "dropdowntest.htm"
url_2_5_4 = "dropdowntest.htm"
url_2_5_5 = "dropdowntest.htm"
td_2_6 = "Category F"
td_2_6_1 = "Subcategory F1"
td_2_6_2 = "Subcategory F2"
td_2_6_3 = "Subcategory F3"
td_2_6_4 = "Subcategory F4"
td_2_6_5 = "Subcategory F5"
td_2_6_6 = "Subcategory F6"
td_2_6_7 = "Subcategory F7"
td_2_6_8 = "Subcategory F8"
td_2_6_9 = "Subcategory F9"
td_2_6_10 = "Subcategory F10"
url_2_6_1 = "dropdowntest.htm"
url_2_6_2 = "dropdowntest.htm"
url_2_6_3 = "dropdowntest.htm"
url_2_6_4 = "dropdowntest.htm"
url_2_6_5 = "dropdowntest.htm"
url_2_6_6 = "dropdowntest.htm"
url_2_6_7 = "dropdowntest.htm"
url_2_6_8 = "dropdowntest.htm"
url_2_6_9 = "dropdowntest.htm"
url_2_6_10 = "dropdowntest.htm"
td_2_7 = "Category G"
td_2_7_1 = "Subcategory G1"
td_2_7_2 = "Subcategory G2"
url_2_7_1 = "dropdowntest.htm"
url_2_7_2 = "dropdowntest.htm"
td_3_1 = "Buoy Data"
td_3_2 = "Sea Surface Temp"
td_3_3 = "Coastal Weather"
td_3_4 = "Latest Marine Forecast"
td_3_5 = "Fifth service"
td_3_6 = "Sixth service"
td_3_7 = "Seventh service"
url_3_1 = "http://www.coastaloutdoors.com/Maps/Southeast.shtml"
url_3_2 = "http://www.sstcharts.com/"
url_3_3 = "http://65.108.254.13/"
url_3_4 = "http://www.wunderground.com/MAR/AM/374.html"
url_3_5 = "dropdowntest.htm"
url_3_6 = "dropdowntest.htm"
url_3_7 = "dropdowntest.htm"

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > Size conflict dropdown menu and phpBB2


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway