Dev Shed Lounge
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherDev Shed Lounge

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:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old May 17th, 2002, 09:24 AM
binky's Avatar
binky binky is offline
Gerbil
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Oct 2001
Location: In a Rotastak
Posts: 1,763 binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 22 h 12 m 52 sec
Reputation Power: 18
Post No more boring clocks!

Only works in IE as the whole thing flashes in NS6 ...

Here we go with more javascript... this time it's an LED style clock with a button that switches between 12/24 hour format.

Looks pretty, and that's what counts.

Check out the javascript forum on devshed for more code from me.

[SIZE=SMALL]The small print:

All these fancy little code snippets posted on Devshed by Binky are 100% Binky and have not been taken from other sites. They may be based upon code examples from various sites, but the code from those examples has in no way whatsoever been used as the basis for the examples posted by Binky.
[/SIZE]
Attached Files
File Type: zip leds.zip (2.1 KB, 258 views)
__________________
- Sorted!

www.ppfuk.com - Free Photo Sharing

Reply With Quote
  #2  
Old May 17th, 2002, 09:56 AM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,834 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Day 23 h 30 m 30 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
Actually, it works well in mozilla also. Isn't that weird...

I have a question for you binky, are you any good at javascript in ns4?

Reply With Quote
  #3  
Old May 17th, 2002, 10:17 AM
binky's Avatar
binky binky is offline
Gerbil
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Oct 2001
Location: In a Rotastak
Posts: 1,763 binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 22 h 12 m 52 sec
Reputation Power: 18
Now that all depends, if it means:

Can I do NS4 compatable javascript when I want to, then yes.

But, if it means:

Do I make a habit of the above, then no.

It depends how much NS4 dependencies are involved. I'll have a go at anything to be honest though.

Reply With Quote
  #4  
Old May 17th, 2002, 10:33 AM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,834 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Day 23 h 30 m 30 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
Ok, mabey you can help then. I have a habit of trying to make thinks work/look the same across the different browsers. On my most current class I have run into a problem with this. It is a progress bar and it works great in ie, ns6, mozilla and konquerer, but doesn't in opera and ns4. What it does is it uses a table to simulate the bar by increasing the width. This works fine for the other browsers, but not for ns4 and opera. Currently for them I have been just making the table flash on and off, which looks crappy compared to the other style. Any ideas?
Attached Files
File Type: gz pgbarexp.tar.gz (1.2 KB, 232 views)

Reply With Quote
  #5  
Old May 17th, 2002, 10:43 AM
binky's Avatar
binky binky is offline
Gerbil
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Oct 2001
Location: In a Rotastak
Posts: 1,763 binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 22 h 12 m 52 sec
Reputation Power: 18
Eh? For some reason the browser wants to download the file as 'attachment.php' and winzip wont open the file.

Anyway, it's end of the working day for me in 5 minutes. So it'll be monday at the earliest. The last progress bar I created used <divs> to represent the bar. It dynamically showed the weight load on the servers CPUs. Something different needed here, but I'll have a go at it.

Reply With Quote
  #6  
Old May 17th, 2002, 10:48 AM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,834 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Day 23 h 30 m 30 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
It opened up for download fine for me. Appreciate you taking a look at it. This class uses a mixture of div and tables. Currently, for testing purposes it just loops expanding until it hits the end of the bar and then restarts, but this will have the capability of being fed info to expand the bar as needed.

Reply With Quote
  #7  
Old May 20th, 2002, 04:53 AM
binky's Avatar
binky binky is offline
Gerbil
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Oct 2001
Location: In a Rotastak
Posts: 1,763 binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 22 h 12 m 52 sec
Reputation Power: 18
This may help:

Code:
<html>
<head>
<style type="text/css">

</style>
<script type="text/javascript">
var isIE = ((navigator.userAgent.indexOf("MSIE") != -1) && (navigator.userAgent.indexOf("Opera") == -1)); 
var isNS4 = ((navigator.appName == "Netscape") && (navigator.userAgent.indexOf("Gecko") == -1))
var isOpera = (navigator.userAgent.indexOf("Opera") != -1)
var isNS6 = ((navigator.appName == "Netscape") && (navigator.userAgent.indexOf("Gecko") != -1))
function plus(value) {
	if (isIE || isNS6 || isOpera) {
		newValue = parseInt(document.getElementById('bar').style.width) + value/100*300
		if (newValue <= 300) {
			document.getElementById('bar').style.width = newValue
		} else {
			document.getElementById('bar').style.width = 300
		}
	} else {
		newValue = parseInt(document.bar.clip.width) + value/100*300
		if (newValue <= 300) {
			document.bar.clip.width = newValue
		} else {
			document.bar.clip.width = 300
		}
	}
}
function minus(value) {
	if (isIE || isNS6 || isOpera) {
		newValue = parseInt(document.getElementById('bar').style.width) - value/100*300
		if (newValue < 0) {
			document.getElementById('bar').style.width = 0
		} else {
			document.getElementById('bar').style.width = newValue
		}
	} else {
		newValue = parseInt(document.bar.clip.width) - value/100*300
		if (newValue < 0) {
			document.bar.clip.width = 0
		} else {
			document.bar.clip.width = newValue
		}
	}

}

</script>
</head>
<body>
<script type='text/javascript'>
	if (isIE || isNS6 || isOpera) {
		document.write("<div style='position:absolute; top:100; left:100; background-color:black; height:20; width:300;'></div><div id='bar' style='position:absolute; top:100; left:100; width:0; height:20; background-color:blue;'></div>")
	} else if (isNS4) {
		document.write("<layer top=100 left=100 width=300 height=20 bgcolor='black'></layer><layer name='bar' top=100 left=100 width=0 height=20 bgcolor='blue'></layer>")
	}
</script>

<form>
<input type='button' value='+10%' onClick='plus(10)'>
<input type='button' value='+1%' onClick='plus(1)'>
<input type='button' value='-1%' onClick='minus(1)'>
<input type='button' value='-10%' onClick='minus(10)'>

</form>
</body>
</html>

Last edited by binky : May 20th, 2002 at 05:31 AM.

Reply With Quote
  #8  
Old May 20th, 2002, 08:28 AM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,834 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Day 23 h 30 m 30 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
You are the man binky, thanks for the help.

Reply With Quote
  #9  
Old May 20th, 2002, 08:53 AM
binky's Avatar
binky binky is offline
Gerbil
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Oct 2001
Location: In a Rotastak
Posts: 1,763 binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 22 h 12 m 52 sec
Reputation Power: 18
You're welcome..

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherDev Shed Lounge > No more boring clocks!


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 5 hosted by Hostway