Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Lionsanime Directory   Improve your ranking, submit to directories   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 08-31-2004, 02:37 AM   #1 (permalink)
Potato Monster
 
Immo's Avatar
 
Join Date: 03-26-04
Location: Chester, England
Posts: 3,869
iTrader: 0 / 0%
Immo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest order
Send a message via ICQ to Immo Send a message via AIM to Immo Send a message via MSN to Immo Send a message via Yahoo to Immo Send a message via Skype™ to Immo
Loop Javascript

Can someone please tell me how to make this script repeat... At the moment it only runs once, there are 9 links on the page, if you hover over 1 it fades in but then none of the other links do.

They are layers that fade in, the javascript is just run on mouseover.

Quote:
<script language="JavaScript">
ie5 = (document.all && document.getElementById);
ns6 = (!document.all && document.getElementById);
opac = 0;
function fadein(ln)
{
if(opac < 90)
{
opac+=5;
if(ie5) { document.getElementById(ln).filters.alpha.opacity = opac; setTimeout("fadein('"+ln+"')", 1);}
if(ns6) { document.getElementById(ln).style.MozOpacity = opac / 100; setTimeout("fadein('"+ln+"')", 20);
}
}
}
</script>
Any help appreciated...
__________________
I have become death, destroyer of worlds.
Immo is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 08-31-2004, 04:34 PM   #2 (permalink)
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,819
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to all
Send a message via MSN to LazyJim
ID's for elements are UNIQUE
only one element will be found
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
LazyJim is offline  
Add Post to del.icio.us
Reply With Quote
Old 08-31-2004, 04:38 PM   #3 (permalink)
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,819
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to all
Send a message via MSN to LazyJim
oh wait i see the function now

please use 'pretty' structure code in future and use the [code] tags in forums.

just check your links for the onmouseover property and make sure the function is in there, and that it passes the correct ID
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
LazyJim is offline  
Add Post to del.icio.us
Reply With Quote
Old 09-01-2004, 02:34 AM   #4 (permalink)
Potato Monster
 
Immo's Avatar
 
Join Date: 03-26-04
Location: Chester, England
Posts: 3,869
iTrader: 0 / 0%
Immo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest order
Send a message via ICQ to Immo Send a message via AIM to Immo Send a message via MSN to Immo Send a message via Yahoo to Immo Send a message via Skype™ to Immo
They all do but it only runs once and then stops and none of the other fade in or appear at all

Sorry about the code thing I had no idea.
__________________
I have become death, destroyer of worlds.
Immo is offline  
Add Post to del.icio.us
Reply With Quote
Old 09-01-2004, 06:54 PM   #5 (permalink)
v7n Mentor
 
imaginemn's Avatar
 
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,935
iTrader: 0 / 0%
imaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to all
Send a message via MSN to imaginemn Send a message via Yahoo to imaginemn Send a message via Skype™ to imaginemn
It's hard to test this without the rest of the code of your page but this is how you do a javascript loop.

[code:1:f61d5aabfb]<script type="text/javascript">
for (i = 0; i <= 10; i++) {
document.writeln(i + "<BR>");
// insert your code here and remove the document.writeln tag
}
</script> [/code:1:f61d5aabfb]

imaginemn
__________________
Imagine Creative Services
Design : Marketing : Multimedia : More
imaginemn is offline  
Add Post to del.icio.us
Reply With Quote
Old 09-20-2004, 04:04 AM   #6 (permalink)
Potato Monster
 
Immo's Avatar
 
Join Date: 03-26-04
Location: Chester, England
Posts: 3,869
iTrader: 0 / 0%
Immo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest order
Send a message via ICQ to Immo Send a message via AIM to Immo Send a message via MSN to Immo Send a message via Yahoo to Immo Send a message via Skype™ to Immo
Which bit of code do I insert, I dont understand what you mean. Im a total Java newbie....
__________________
I have become death, destroyer of worlds.
Immo is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



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

vB 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
PHP - Loop through dates ToddW Coding Forum 4 04-04-2008 01:30 PM
Loop Flash Video? lajones3 Coding Forum 2 08-17-2007 07:53 PM
SQL Loop Help, Please JohnRogers Coding Forum 1 01-21-2007 12:27 PM
Getting Back into the Loop IslaScotts Coding Forum 4 09-28-2006 01:05 PM
Infinite Loop hatchet Coding Forum 1 09-11-2004 04:45 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 12:04 AM.
© Copyright 2008 V7 Inc