Current location: Hot Scripts Forums » General Web Coding » HTML/XHTML/XML » Creating a drop down menu?


Creating a drop down menu?

Reply
  #1 (permalink)  
Old 01-04-04, 12:50 PM
Spreegem Spreegem is offline
Newbie Coder
 
Join Date: Jan 2004
Location: In front of my computer
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
Creating a drop down menu?

How would I create a drop down menu that automatically drops down, and has a black back ground? I am newbie to this but would like to learn how to. I may use flash to make a drop down menu, but would like to see if there are other ways first.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 01-04-04, 01:08 PM
jayhawk jayhawk is offline
Newbie Coder
 
Join Date: Dec 2003
Location: Santa Fe, NM
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Spreegem
How would I create a drop down menu that automatically drops down, and has a black back ground? I am newbie to this but would like to learn how to. I may use flash to make a drop down menu, but would like to see if there are other ways first.
You can create a drop down menu using Javascript. Check this out as well: http://javascript.internet.com/gener...down-menu.html
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 01-04-04, 01:25 PM
Spreegem Spreegem is offline
Newbie Coder
 
Join Date: Jan 2004
Location: In front of my computer
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
Yes. . . but I was more looking for being able to customise my menu, have a black background with orange hyperlinks or soemthing like that. Could that be done with Javascript or HTML, or would I have to use flash if I wanted to do something like that?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 01-04-04, 07:20 PM
jayhawk jayhawk is offline
Newbie Coder
 
Join Date: Dec 2003
Location: Santa Fe, NM
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Spreegem
Yes. . . but I was more looking for being able to customise my menu, have a black background with orange hyperlinks or soemthing like that. Could that be done with Javascript or HTML, or would I have to use flash if I wanted to do something like that?
You can do that with JavaScript and HTML. For example:

<select name="menu" size="1" style="background-color:#000000" onChange="Your javascript function">
<option value="http://yoursite.com">yoursite.com</option>
<option value="http://yoursite2.com">yoursite2.com</option>
<option value="http://yoursite3.com">yoursite3.com</option>
</select>


The above code will produce a drop down with a black background. You will have to build a function in Javascript that redirects the user to the website that they choose in the drop down. As far as the orange hyperlinks go, you can use CSS.

Hope this helps.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 01-05-04, 05:36 AM
gwx gwx is offline
Newbie Coder
 
Join Date: Dec 2003
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
You use what is called DHTML, a combo of HTML, CSS and Javascript. Go read it up.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 01-17-04, 02:29 PM
delerium's Avatar
delerium delerium is offline
Newbie Coder
 
Join Date: Jan 2004
Location: pittsburgh
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
if you want something that really catches the eye, use SMIL. you can embed it into the html. nothing needs to be downloaded by the user to run it. as far as i know, IE 5 and above support this. it will give you a very smooth transition. i will give you an example (this example is long and can be confusing since i stripped out a great deal of the code not pertaining to this question. It took me several days to develop this, so if your gonna use it for money...give a shout out to me lol)
<!----all images, design, layout, and source code created by delerium----->
<html xmlns:smil="urn:schemas-microsoft-com:time">
<style>
.time{ behavior: url(#default#time2);}
smil\:* { behavior:url(#default#time2)}
time:* { behavior:url(#default#time2)}
body { background-color:black;color:white;font-family:verdana;font-size:10pt; }

</style>
</head>

<body>

<!-------------------------this begins the navigation bar---------->
<!---test--->
<DIV STYLE="position:absolute; top:65; right:0;">
<smil:par begin="test.click" end="test1.click;test2.click;end.click;" >
<smil:animateMotion begin="0" dur="1" targetElement="test1"
values="0,0;0,75" fill="hold"/>
<smil:animateMotion begin="0" dur="1" targetElement="test2"
values="0,0;0,75" fill="hold"/>
<smil:animateMotion begin="0" dur="1" targetElement="end"
values="0,0;0,75" fill="hold"/>
</smil:par>
<div style="position:relative;top:65;right:0;width:0"id ="test" >
<img src="gif/test.gif" width="128" height="79"></a>
</div>
</div>

<!---test1---->
<DIV STYLE="position:absolute; top:144; right:0; ">
<smil:par begin="test1.click" end="test.click;test2.click;end.click" >
<smil:animateMotion begin="0" dur="1" targetElement="test2"
values="0,0;0,100" fill="hold" />
<smil:animateMotion begin="0" dur="1" targetElement="end"
values="0,0;0,100" fill="hold" />
</smil:par>
<div style="position:relative;top:65;right:0;width:0"id ="test1">
<img src="gif/test2.gif" width="128" height="79" >
</div>
</div>
<!----------this begins the drop down inside part------------>

<!----drop down for test--->
<DIV STYLE="position:absolute; top:210; right:0; z-index:-2;">
<div CLASS=time end="test1.click;test2.click;test3.click" begin="test.click" style="width:100;height:75;
filter:progid:DXImageTransform.Microsoft.Gradient( GradientType=1, StartColorStr=black, EndColorStr=#333399);font-size:12pt;">
<font color="white" >

<div id="hide" ONCLICK="loadomniaFrame()" onmouseover="this.style.color='#0099FF'" onmouseout=" this.style.background='', this.style.color=''">
<b STYLE="cursor: default"> Choice 1 </b>
</div>
<div id="hide1" ONCLICK="loadmuntarFrame()" onmouseover="this.style.color='#0099FF'" onmouseout=" this.style.background='', this.style.color=''">
<b STYLE="cursor: default">choice 2</b>
</div>
<div id="hide12" ONCLICK="loadexFrame()" onmouseover="this.style.color='#0099FF'" onmouseout="this.style.background='', this.style.color=''">
<b STYLE="cursor: default">choice 3 </b>
</div>
</font>
</div>
</div>
<DIV ID="overlay" STYLE="position:absolute; visibility:hidden; top:212; right:100;">
<IMG SRC="gif/bally.gif" width="15" height="15" >
</DIV>
<DIV ID="overlay1" STYLE="position:absolute; visibility:hidden; top:230; right:100;">
<IMG SRC="gif/bally.gif" width="15" height="15" >
</DIV>
<DIV ID="overlay12" STYLE="position:absolute; visibility:hidden; top:255; right:100;">
<IMG SRC="gif/bally.gif" width="15" height="15" >
</DIV>
</body>
</html>
----------------------------------------------------
sorry, i meant to post this under your thread but some how posted it as a new thread.
also, you will need to supply your own images. if you have any problems with this, let me know. in this example im using filters to make the background a fade too, you can just change the hex value to be black.
another way is to use styles. its not as impressive but does work. goto www.webmonkey.com for a tutorial on that. hope you like
--delerium
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #7 (permalink)  
Old 07-29-04, 11:06 AM
dwoody dwoody is offline
Newbie Coder
 
Join Date: Jul 2004
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Black bg with orange links

Here is a menu with orange text and a black background. You can customize it furthur with Style Sheets. Theres also a function included that takes the page to the location specified in the value of the selct options.


<html>
<script>

function goThere()
{
if(window.document.menuform.menu.selectedIndex!=0)
{
window.location = window.document.menuform.menu.options[window.document.menuform.menu.selectedIndex].value
}
}

</script>
<form name="menuform" id="menuform">
<select name="menu" id="menu" size="1" style="background-color:#000000; color:#FF9900;" onChange="goThere()">
<option value="#">- - Select an Option - -</option>
<option value="http://www.tsn.com">TSN</option>
<option value="http://www.hotscripts.com">Hot Scripts</option>
</select>
</form>


<html>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #8 (permalink)  
Old 08-27-04, 01:13 AM
vivichie vivichie is offline
Newbie Coder
 
Join Date: Aug 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Your drop down menu alternative

U can use dreamweaver to create drop down menus.. customize ur own colour, own font, anything.. and the javascript codes will be generated for you by dreamweaver..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #9 (permalink)  
Old 08-31-04, 12:40 AM
jamslam jamslam is offline
Newbie Coder
 
Join Date: Aug 2004
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
@delerium, that is IE only. It won't work in any other browser...

You cannot create a drop down menu without neglecting some of your users, thusly making whatever is in your drop down menu inaccessible.

The best that I have come up with is a drop down menu driven on CSS, which allows it to work in all browsers, except for MSIE. However, in MSIE I created a .htc file (HTML Component) that will emulate the ':hover' in CSS...

http://www.webtrickscentral.com/stuf..._dropdown.html

And the HTC file (make sure 'behavior: url(the HTC file);') points to the propwer location...

http://jamslam.zyns.com/moz.htc

Very each to change via stylesheet.. easily customizable. No need to credit me either.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a drop down menu ? ? ? Spreegem PHP 4 03-09-05 10:34 AM
error when creating database tables with php script spiroth10 PHP 4 01-06-04 04:59 PM
Wow, a dynamic menu, error! Programme PHP 3 01-05-04 03:16 PM
drop the lowest number TheLaughingBandit ASP 2 08-30-03 02:57 PM
putting content in a drop down menu tom PHP 7 07-04-03 03:25 PM


All times are GMT -5. The time now is 05:34 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.