Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java Script Menu/DHTML

Status
Not open for further replies.

outsourceoncall

Technical User
Dec 20, 2001
36
US
I have a client who wants to "mock" a sister site: I am up to my elbo's with content, and I do not know java script, I am looking for someone to do the JS for the drop down menus. I need them now, (actually by end of day feb 12, 2002.)

Email me at info@outsourceoncall.com
DH
 
the following will create a simple menu just edit the code for your needs

<script>
function rollover(obj, color)
{
obj.style.color = color
}

function statesCriteria(MenuOption) {

if(MenuOption == 1)
{
parent.window.frames.mainFrame.StatesCriteriaType.innerText= (&quot;All&quot;);
}
if(MenuOption == 2)
{
parent.window.frames.mainFrame.StatesCriteriaType.innerText= (&quot;Select Individual&quot;);
}
if(MenuOption == 3)
{
parent.window.frames.mainFrame.StatesCriteriaType.innerText= (&quot;Leave Unspecified&quot;);
}

}
function sitesCriteria(MenuOption) {

if(MenuOption == 1)
{
parent.window.frames.mainFrame.SitesCriteriaType.innerText= (&quot;All&quot;);
}
if(MenuOption == 2)
{
parent.window.frames.mainFrame.SitesCriteriaType.innerText= (&quot;Select Individual&quot;);
}
if(MenuOption == 3)
{
parent.window.frames.mainFrame.SitesCriteriaType.innerText= (&quot;Leave Unspecified&quot;);
}
}
function EquipmentCriteria(MenuOption) {

if(MenuOption == 1)
{
parent.window.frames.mainFrame.EquipmentCriteriaType.innerText= (&quot;All&quot;);
}
if(MenuOption == 2)
{
parent.window.frames.mainFrame.EquipmentCriteriaType.innerText= (&quot;Select Make&quot;);
}
if(MenuOption == 3)
{
parent.window.frames.mainFrame.EquipmentCriteriaType.innerText= (&quot;Select Individual&quot;);
}
if(MenuOption == 4)
{
parent.window.frames.mainFrame.StatesCriteriaType.innerText= (&quot;Leave unspecified&quot;);
}
}
</script>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
<!-- // Collapsible Menu 1.0-->
<elsberndmenu id=&quot;elsbernd&quot; name=&quot;elsbernd&quot;>
<style type=&quot;text/css&quot;>
<!--Body

P {margin-top : 0px; }
A {text-decoration: none;
font-family: Verdana, Arial, Helvetica, sans-serif;
line-height: 9pt;
} .mainsection {
font-size: 9pt;
font-weight: bold;
}.subsection {
font-size: 7pt;
font-weight: normal;
margin-left: 15px;
}.folding {
cursor: hand
}
-->
</style>
<script language=&quot;javascript&quot;>
<!--
//Expands and contracts the menu (if in Internet Explorer 4.0 or higher)
function change() {
if(!document.all)
return
if (event.srcElement.className==&quot;expandable&quot;){
var x=event.srcElement.parentElement
if (x.all[2].style.display==&quot;none&quot;){
x.all[2].style.display='';
}
else {
x.all[2].style.display=&quot;none&quot;
}
}
if (event.srcElement.className==&quot;expandable2&quot;){
var x=event.srcElement.parentElement
if (x.all[2].style.display==&quot;none&quot;){
x.all[2].style.display='';
}
else {
x.all[2].style.display=&quot;none&quot;
}
}
}
document.onclick=change
//-->
</SCRIPT>
</head>

<body bgcolor=&quot;#000000&quot; text=&quot;#0000FF&quot; link=&quot;#0000FF&quot; vlink=&quot;#0000FF&quot; alink=&quot;#0000FF&quot;>
<table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;1&quot; rules=&quot;rows&quot;>
<tr>
<td class=&quot;mainsection&quot;> <a class=&quot;expandable&quot; href=&quot;#&quot; onMouseOver = rollover(this,'red') onMouseOut = rollover(this,'blue') onmousedown = rollover(this,'#00FF00') onMouseUp = rollover(this,'red') >States</a><br>
<p class=&quot;subsection&quot; style=&quot;display:none&quot;> <a onMouseOver = rollover(this,'red') onMouseOut = rollover(this,'blue') onmousedown = rollover(this,'#00FF00') onMouseUp = rollover(this,'red') onclick = statesCriteria(1)>All</a>
<br>
<a onMouseOver = rollover(this,'red') onMouseOut = rollover(this,'blue') onmousedown = rollover(this,'#00FF00') onMouseUp = rollover(this,'red') onclick = statesCriteria(2)>Select Individual</a> <br>
<a target=&quot;mainFrame&quot; onMouseOver = rollover(this,'red') onMouseOut = rollover(this,'blue') onmousedown = rollover(this,'#00FF00') onMouseUp = rollover(this,'red') onclick = statesCriteria(3)>leave unspecified</a> </p>
</td>
</tr>
</table>
<table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;1&quot; rules=&quot;rows&quot;>
<tr>
<td class=&quot;mainsection&quot; height=&quot;51&quot;> <a class=&quot;expandable&quot; href=&quot;#&quot; onMouseOver = rollover(this,'red') onMouseOut = rollover(this,'blue') onmousedown = rollover(this,'#00FF00') onMouseUp = rollover(this,'red') >Sites</a><br>
<p class=&quot;subsection&quot; style=&quot;display:none&quot;> <a target=&quot;mainFrame&quot; onMouseOver = rollover(this,'red') onMouseOut = rollover(this,'blue') onmousedown = rollover(this,'#00FF00') onMouseUp = rollover(this,'red') onclick = sitesCriteria(1)>All</a>
<br>
<a target=&quot;mainFrame&quot; onMouseOver = rollover(this,'red') onMouseOut = rollover(this,'blue') onmousedown = rollover(this,'#00FF00') onMouseUp = rollover(this,'red') onclick = sitesCriteria(2)>Select Individual</a> <br>
<a target=&quot;mainFrame&quot; onMouseOver = rollover(this,'red') onMouseOut = rollover(this,'blue') onmousedown = rollover(this,'#00FF00') onMouseUp = rollover(this,'red') onclick = sitesCriteria(3)>leave unspecified</a> </p>
</td>
</tr>
</table>
<table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;1&quot; rules=&quot;rows&quot;>
<tr>
<td class=&quot;mainsection&quot;> <a class=&quot;expandable&quot; href=&quot;#&quot; onMouseOver = rollover(this,'red') onMouseOut = rollover(this,'blue') onmousedown = rollover(this,'#00FF00') onMouseUp = rollover(this,'red') >Equipment</a><br>
<p class=&quot;subsection&quot; style=&quot;display:none&quot;> <a target=&quot;mainFrame&quot; onclick = EquipmentCriteria(1)>All</a>
<br>
<a target=&quot;mainFrame&quot; onMouseOver = rollover(this,'red') onMouseOut = rollover(this,'blue') onmousedown = rollover(this,'#00FF00') onMouseUp = rollover(this,'red') onclick = EquipmentCriteria(2)>Specify Make</a> <br>
<a target=&quot;mainFrame&quot; onMouseOver = rollover(this,'red') onMouseOut = rollover(this,'blue') onmousedown = rollover(this,'#00FF00') onMouseUp = rollover(this,'red') onclick = EquipmentCriteria(3)>Select Individual</a>
<a target=&quot;mainFrame&quot; onMouseOver = rollover(this,'red') onMouseOut = rollover(this,'blue') onmousedown = rollover(this,'#00FF00') onMouseUp = rollover(this,'red') onclick = EquipmentCriteria(4)>Leave Unspecified</a> </p>
</td>
</tr>
</table>
<table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;1&quot; rules=&quot;rows&quot;>
<tr>
<td class=&quot;mainsection&quot; height=&quot;51&quot;> <a class=&quot;expandable&quot; href=&quot;#&quot; onMouseOver = rollover(this,'red') onMouseOut = rollover(this,'blue') onmousedown = rollover(this,'#00FF00') onMouseUp = rollover(this,'red') >Reports</a><br>
<p class=&quot;subsection&quot; style=&quot;display:none&quot;> <a href=&quot;#&quot; target=&quot;mainFrame&quot;>Summary
Reoprt </a><br>
<a href=&quot;#&quot; target=&quot;mainFrame&quot; onMouseOver = rollover(this,'red') onMouseOut = rollover(this,'blue') onmousedown = rollover(this,'#00FF00') onMouseUp = rollover(this,'red') >Detailed Report</a><br>
<a href=&quot;#&quot; target=&quot;mainFrame&quot; onMouseOver = rollover(this,'red') onMouseOut = rollover(this,'blue') onmousedown = rollover(this,'#00FF00') onMouseUp = rollover(this,'red') >Saved Reports</a> </p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p><p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p></body>
</html>
 
You can go to and view their selection and d/l them...all you would have to do then is modify them...
I have not failed; I merely found 100,000 different ways of not succeding...
 
Thanks, But I am really looking to completely outsource this to someone who can just say, &quot;you worry about the rest of the site, let me worry abou the menu's&quot;...I'll pay.
 
emal me and give me the details. caseye@lamechanical.com
 
Badrinth,

Your menus are very similar in action that I am looking for....

By the way...you email link on your site does not do anything....
 
Hi

well the email link on my site gives you my email address for correspondance which is webmaster@bmchebbi.com.Please let me know if you need something.

Thanks
Badrinath Chebbi Badrinath Chebbi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top