Go Back   DevHunters.com l Webmaster Forum - Web Advertising - Web Design - SEO Forums > Webmaster / Coding / Web Design Discussion > JavaScript Programming

JavaScript Programming Discuss javascript coding.

Have A Look At Some Of Our Webmaster Related Sponsors!


Script Directory


Shopping Cart


Market Leverage


Free Templates

3D Guide-Characters
3D Guide-characters

social bookmarking network
Advertise Here

Reply
 
LinkBack Thread Tools Display Modes
Old 03-10-2008, 11:13 AM   #1 (permalink)
New Hunter
 

Join Date: Sep 2007
Posts: 37
iTrader: 0 / 0%
Hunter Bux: 0
deatle is on a distinguished road
Exclamation help please

Well im new in webdesign and i encountered some difficulties!

I wanna to create a menu with dropdown tabs! i tried using this script but it just shows one subtab while i want 3 subtabs to be shown! here is the script im using!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
#Layer1 {
position:absolute;
left:0;
top:2;
width:25%;
height:25%;
z-index:1;
background-color: #000000;
}
.style1 {color: #FFFFFF}
#Layer2 {
position:absolute;
left:25%;
top:2;
width:25%;
height:25%;
z-index:2;
background-color: #000000;
}
#Layer3 {
position:absolute;
left:2px;
top:23px;
width:189px;
height:21px;
z-index:3;
background-color: #FF0000;
}
#Layer4 {
position:absolute;
left:2px;
top:45px;
width:189px;
height:23px;
z-index:4;
background-color: #FF0000;
}
#Layer5 {
position:absolute;
left:2px;
top:69px;
width:189px;
height:20px;
z-index:5;
background-color: #FF0000;
}
#Layer6 {
position:absolute;
left:193px;
top:23px;
width:195px;
height:20px;
z-index:6;
background-color: #0000FF;
}
#Layer7 {
position:absolute;
left:193px;
top:44px;
width:195px;
height:15px;
z-index:7;
background-color: #0000FF;
}
#Layer8 {
position:absolute;
left:192px;
top:62px;
width:195px;
height:25px;
z-index:8;
background-color: #0000FF;
}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}
//-->
</script>
</head>

<body >
<div class="style1" id="Layer1">
<a href="" onmouseover="MM_showHideLayers('Layer3','','show', 'Layer4','','show','Layer5','','show')" onmousemove="MM_showHideLayers('Layer3','','show', 'Layer4','','show','Layer5','','show')" onmouseout="MM_showHideLayers('Layer3','','hide',' Layer4','','hide','Layer5','','hide')"><div align="center">Home</div></a>

</div>
<div id="Layer2">
<div align="center" class="style1">About Us</div>
</div>
<div id="Layer3" onmousemove="MM_showHideLayers('Layer3','','show') " onmouseout="MM_showHideLayers('Layer3','','hide')" >
<div align="center" onmouseover="MM_showHideLayers('Layer3','','show') ">had </div>
<div align="center" onmouseover="MM_showHideLayers('Layer3','','show') ">asd</div>
<div align="center" onmouseover="MM_showHideLayers('Layer3','','show') ">asda</div>
</div>

<div id="Layer6">
<div align="center">gdgsa</div>
</div>
<div id="Layer7">
<div align="center">asdasdsa</div>
</div>
<div id="Layer8">
<div align="center">asdasd</div>
</div>
</body>
</html>

dont consider the other part of the layers(about)... thank you
__________________
Anthony.Riachy

Last edited by deatle; 03-10-2008 at 11:16 AM.
deatle is offline   Reply With Quote
Old 03-10-2008, 11:46 AM   #2 (permalink)
New Hunter
 

Join Date: Dec 2007
Location: United Kingdom - Dorset - Bournemouth
Posts: 87
iTrader: 0 / 0%
Hunter Bux: 5.00
Smiggy will become famous soon enoughSmiggy will become famous soon enough
Send a message via MSN to Smiggy
Default

I had a look at it and it looks wierd. None of it works.

Did you make it yourself or like download it?
__________________
<!-- I can type the entire Alphabet in 2.19 seconds -->

/* (X/D)Html, Css, Javascript, Ajax, Xml (DTD), PHP, MySQL, E4X */
/* Learning C++ and German */
Smiggy is offline   Reply With Quote
Old 03-10-2008, 12:08 PM   #3 (permalink)
New Hunter
 

Join Date: Sep 2007
Posts: 37
iTrader: 0 / 0%
Hunter Bux: 0
deatle is on a distinguished road
Default

well i did it but it worked on firefox! dont concentrate on the design its just a trial! so if it doesn't work for you can u give me a script to do it??
__________________
Anthony.Riachy
deatle is offline   Reply With Quote
Old 03-10-2008, 04:55 PM   #4 (permalink)
New Hunter
 

Join Date: Dec 2007
Location: United Kingdom - Dorset - Bournemouth
Posts: 87
iTrader: 0 / 0%
Hunter Bux: 5.00
Smiggy will become famous soon enoughSmiggy will become famous soon enough
Send a message via MSN to Smiggy
Default

I could give you an idea of what to do.

First, do all the CSS, but set the visibility of the hidden menus which show on mouse over.

The JS is simple, just put together some document.getElementById('layer1').style.visibility = "visible" etc.

I'll write a script later.
__________________
<!-- I can type the entire Alphabet in 2.19 seconds -->

/* (X/D)Html, Css, Javascript, Ajax, Xml (DTD), PHP, MySQL, E4X */
/* Learning C++ and German */
Smiggy is offline   Reply With Quote
Old 03-11-2008, 06:11 AM   #5 (permalink)
Senior Moderator
 
SpOrTsDuDe.Reese's Avatar
Default

For practice, look at other websites and look at how they did it. That can be a good learner.
__________________
+-(X)HTML, CSS, JavaScript, SEO, PHP, Flash-+
Code:
<style type="text/css"> u { text-decoration: none; } </style>
GameYin. Redesigning for DevPlooth.
SpOrTsDuDe.Reese is offline   Reply With Quote
Old 03-11-2008, 02:13 PM   #6 (permalink)
New Hunter
 

Join Date: Sep 2007
Posts: 37
iTrader: 0 / 0%
Hunter Bux: 0
deatle is on a distinguished road
Default

well thanks!
__________________
Anthony.Riachy
deatle is offline   Reply With Quote
Old 03-12-2008, 04:25 AM   #7 (permalink)
Senior Moderator
 
SpOrTsDuDe.Reese's Avatar
Default

Also you shouldn't be using divs to align things. Let CSS do that for you.
__________________
+-(X)HTML, CSS, JavaScript, SEO, PHP, Flash-+
Code:
<style type="text/css"> u { text-decoration: none; } </style>
GameYin. Redesigning for DevPlooth.
SpOrTsDuDe.Reese is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -5. The time now is 08:16 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
vBCredits v1.4 Copyright ©2007, PixelFX Studios