Site Statistics
 
Threads: 4,062
Posts: 17,767
Members: 3,098
Users Online: 7
Newest Member: Karen


Go Back   PC101 > Computer Related Forums > Tutorials and How-To...

Tutorials and How-To... Learning something new is just a click away! Provided to you by members and staff.


Reply
 
LinkBack Thread Tools Display Modes
Old 01-23-2007, 11:18 PM   #1
Head Mistress
 
Lyte's Avatar
 
Join Date: Oct 2005
Location: Good ol' U.S. of A
Posts: 3,470
Rep Power: 7 Lyte is on a distinguished road
Send a message via MSN to Lyte Send a message via Yahoo to Lyte Send a message via Skype™ to Lyte
Java - Drop Down Menus

Check out what I learned today! This is a very basic script on how to create dropdowns.

This first bit o' code is not the drop down menu itself but is necessary and must be placed somewhere above the drop down menu coding:

Code:
<script language="JavaScript">
<!--function go() [location=document.drop.example.
options[document.drop.example.selectedIndex].value}//--> 
</script>
Then create your drop down menu using code like this:

Code:
<form name="drop">
<select name="example" size="1">
<option value="http://www.pc101.com">PC101</option>
<option value="http://www.google.com">Google</option>
<option value="http://www.yahoo.com">Yahoo</option>
</select><input type="button" name="test" value="Go!" onclick="go()"></form>
All together, the result should look like this...

<--link

I didn't think a drop down was so easily created!

Lyte
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Lyte is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-24-2007, 08:25 PM   #2
Senior
 
firestorm's Avatar
 
Join Date: Jan 2006
Location: US of A!
Posts: 777
Rep Power: 3 firestorm is on a distinguished road
Send a message via AIM to firestorm Send a message via MSN to firestorm
They are easy to create, but I'd prefer a CSS coded drop down menu. That way you don't have to rely on peoples browser accepting javascript(even though a small minority don't).
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Registered Linux user #403288
firestorm is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-24-2007, 08:42 PM   #3
Head Mistress
 
Lyte's Avatar
 
Join Date: Oct 2005
Location: Good ol' U.S. of A
Posts: 3,470
Rep Power: 7 Lyte is on a distinguished road
Send a message via MSN to Lyte Send a message via Yahoo to Lyte Send a message via Skype™ to Lyte
Kewl! Can you present some sample coding (as I did) so we can see how it's done?

Lyte
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Lyte is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-24-2007, 09:29 PM   #4
Senior
 
firestorm's Avatar
 
Join Date: Jan 2006
Location: US of A!
Posts: 777
Rep Power: 3 firestorm is on a distinguished road
Send a message via AIM to firestorm Send a message via MSN to firestorm
do i have 2? lol yea itll be up by tomorrow.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Registered Linux user #403288
firestorm is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-25-2007, 09:52 PM   #5
Senior
 
firestorm's Avatar
 
Join Date: Jan 2006
Location: US of A!
Posts: 777
Rep Power: 3 firestorm is on a distinguished road
Send a message via AIM to firestorm Send a message via MSN to firestorm
http://www.htmldog.com/articles/suckerfish/dropdowns/
Doubt I could write it any better. If you need anything explained let me know. With CSS, you can add more links with ease, just copy and paste.

All you essentially do is make a fancy list (<li>)
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Registered Linux user #403288
firestorm is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-26-2007, 05:31 AM   #6
Senior
 
dr911's Avatar
 
Join Date: Nov 2005
Location: Northern Arizona
Posts: 660
Rep Power: 4 dr911 is on a distinguished road
I'm very impressed...Lyte. Nice job. When I get some time, I will add on some codes for "you-all" !!
__________________
May Your Wishes Come True !!

DR911

Goverment Grant & Loan Infomation


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dr911 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-26-2007, 09:27 PM   #7
Head Mistress
 
Lyte's Avatar
 
Join Date: Oct 2005
Location: Good ol' U.S. of A
Posts: 3,470
Rep Power: 7 Lyte is on a distinguished road
Send a message via MSN to Lyte Send a message via Yahoo to Lyte Send a message via Skype™ to Lyte
Quote:
Originally Posted by dr911 View Post
When I get some time, I will add on some codes for "you-all" !!
That would be great! We'd appreciate it!

Lyte
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Lyte is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-27-2007, 01:54 AM   #8
Senior
 
dr911's Avatar
 
Join Date: Nov 2005
Location: Northern Arizona
Posts: 660
Rep Power: 4 dr911 is on a distinguished road
Ok...Lyte & others,
Here we go.

To add a "clock" using "Java-scriptting code"



Quote:
</SCRIPT></p></font color>
<font color=#000ff><p><SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function MakeArrayday(size) {
this.length = size;
for(var i = 1; i <= size; i++) {
this[i] = "";
}
return this;
}
function MakeArraymonth(size) {
this.length = size;
for(var i = 1; i <= size; i++) {
this[i] = "";
}
return this;
}
function funClock() {
if (!document.layers && !document.all)
return;
var runTime = new Date();
var hours = runTime.getHours();
var minutes = runTime.getMinutes();
var seconds = runTime.getSeconds();
var dn = "AM";
if (hours >= 12) {
dn = "PM";
hours = hours - 12;
}
if (hours == 0) {
hours = 12;
}
if (minutes <= 9) {
minutes = "0" + minutes;
}
if (seconds <= 9) {
seconds = "0" + seconds;
}
movingtime = "<b>"+ hours + ":" + minutes + ":" + seconds + " " + dn + "</b>";
if (document.layers) {
document.layers.clock.document.write(movingtime);
document.layers.clock.document.close();
}
else if (document.all) {
clock.innerHTML = movingtime;
}
setTimeout("funClock()", 1000)
}
window.onload = funClock;
// End -->
</script>
__________________
May Your Wishes Come True !!

DR911

Goverment Grant & Loan Infomation


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dr911 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-27-2007, 02:03 AM   #9
Senior
 
dr911's Avatar
 
Join Date: Nov 2005
Location: Northern Arizona
Posts: 660
Rep Power: 4 dr911 is on a distinguished road
And to make "sentence or two to scroll across your site (called "marquee")

Quote:
<p><marquee>
<h1><font color=#000ff><u>What Ever You Want To Say Here</u></font
color></h1></marquee></p>
Now the ......."#000ff" is the color your letters or numbers will turn out to be......in this case it's a "dark blue".

Here's a cool web page to help you all out with colors;
Link:http://ilovethecode.com/HTML/HTML-Tu...or_Chart.shtml
__________________
May Your Wishes Come True !!

DR911

Goverment Grant & Loan Infomation


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dr911 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-27-2007, 03:01 PM   #10
Head Mistress
 
Lyte's Avatar
 
Join Date: Oct 2005
Location: Good ol' U.S. of A
Posts: 3,470
Rep Power: 7 Lyte is on a distinguished road
Send a message via MSN to Lyte Send a message via Yahoo to Lyte Send a message via Skype™ to Lyte
Kewl! Do you have an example of the clock script in action some where??

Lyte
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Lyte is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-28-2007, 05:20 AM   #11
Senior
 
dr911's Avatar
 
Join Date: Nov 2005
Location: Northern Arizona
Posts: 660
Rep Power: 4 dr911 is on a distinguished road
Quote:
Originally Posted by Lyte View Post
Kewl! Do you have an example of the clock script in action some where??

Lyte
Yes I do....Lyte & others....go to my web site: http://www.freeusmoney.com

and look up at the top (sort of left hand side) and you will see a clock & date there in blue.
__________________
May Your Wishes Come True !!

DR911

Goverment Grant & Loan Infomation


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dr911 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-28-2007, 04:46 PM   #12
Head Mistress
 
Lyte's Avatar
 
Join Date: Oct 2005
Location: Good ol' U.S. of A
Posts: 3,470
Rep Power: 7 Lyte is on a distinguished road
Send a message via MSN to Lyte Send a message via Yahoo to Lyte Send a message via Skype™ to Lyte
Kewl! And I guess that's the marquee script in action across the top??

Lyte
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Lyte is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-28-2007, 09:09 PM   #13
Senior
 
dr911's Avatar
 
Join Date: Nov 2005
Location: Northern Arizona
Posts: 660
Rep Power: 4 dr911 is on a distinguished road
Quote:
Originally Posted by Lyte View Post
Kewl! And I guess that's the marquee script in action across the top??

Lyte
Yes, your right Lyte. You can change the speed & colors in the marquee to any thing you want. The "clock" is actually the time your PC is set up to be.

I post a few more when I get som time !!
__________________
May Your Wishes Come True !!

DR911

Goverment Grant & Loan Infomation


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dr911 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Does Google drop a site that was indexed once? stoli_sambuca PC & Tech Related News, Events and More! 7 09-11-2006 09:14 PM



All times are GMT -5. The time now is 05:51 AM.

Powered by vBulletin Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC5