[advanced search]
Results from the most recent live auction are here.
16 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Go Back   NamePros.Com > Design and Development > Programming > CODE
User Name
Password

Old 01-21-2006, 10:16 PM   · #1
blackwizard
Account Suspended
 
Location: India
Trader Rating: (8)
Join Date: Oct 2005
Posts: 636
NP$: 15.35 (Donate)
blackwizard is a jewel in the roughblackwizard is a jewel in the roughblackwizard is a jewel in the rough
pulsating text!

Step 1: Insert the below script into the <HEAD> section of your page:

Select All

<script>


var divs = new Array();
var da = document.all;
var start;

//CONFIGUER THESE VARS!!!!!!
//speed of pulsing
var speed = 50;

function initVars(){

if (!document.all)
return

//Extend of shrink the below list all you want
//put an "addDiv(1,"2",3,4); for each div you made,
//1)'id' of div
//2)color or glow(name or hex)(in quotes!!!)
//3)minimum strength
//4)maximum strength

addDiv(hi,"lime",2,11);
addDiv(welcome,"red",4,9);
addDiv(message,"purple",2,4);
addDiv(msg2,"orange",15,17);
addDiv(msg3,"blue",1,3);

//NO MORE EDITING!!!!!!



startGlow();
}

function addDiv(id,color,min,max)
{
var j = divs.length;
divs[j] = new Array(5);
divs[j][0] = id;
divs[j][1] = color;
divs[j][2] = min;
divs[j][3] = max;
divs[j][4] = true;
}

function startGlow()
{
if (!document.all)
return 0;

for(var i=0;i<divs.length;i++)
{
divs[i][0].style.filter = "Glow(Color=" + divs[i][1] + ", Strength=" + divs[i][2] + ")";
divs[i][0].style.width = "100%";
}

start = setInterval('update()',speed);
}

function update()
{
for (var i=0;i<divs.length;i++)
{
if (divs[i][4])
{
divs[i][0].filters.Glow.Strength++;
if (divs[i][0].filters.Glow.Strength == divs[i][3])
divs[i][4] = false;
}

if (!divs[i][4])
{
divs[i][0].filters.Glow.Strength--;
if (divs[i][0].filters.Glow.Strength == divs[i][2])
divs[i][4] = true;
}
}
}
-->
</script>

Step 2: Inside the <BODY> section, add the following sample HTML code:

Select All

<div id="hi" style="color: lime">
Hello!
</div>
<br>
<div id="welcome" style="color: lime">
Welcome!
</div>
<br>
<div id="message" style="color: lime">
This is a pulsating message!
</div>
<br>
<div id="msg2" style="color: lime">
This is another pulsating message!
</div>
<br>
<div id="msg3" style="color: lime">
This is yet another pulsating message!
</div>

Step 3: Finally, with the <BODY> tag itself, add the below event handler into it:

<body onLoad="initVars()">

Configuring the script

Configuration of this script is a two part process. First off, you need to specify in the script of Step 1 the text(s) that will have a pulsating effect, by means of a unqiue ID for each text. The HTML code containing the actual text (code of Step 2) must then carry these specified ID names.


Please register or log-in into NamePros to hide ads
blackwizard is offline   Reply With Quote
Old 01-21-2006, 10:43 PM   · #2
weblord
www.1weblord.com
 
weblord's Avatar
 
Name: William R. Nabaza - williamrnabaza.com
Location: Philippines - www.Nabaza.com
Trader Rating: (224)
Join Date: Dec 2005
Posts: 18,088
NP$: 17046.78 (Donate)
weblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatness
Autism Protect Our Planet
im sure i will have a use for that some day. rep added. thanks.
weblord is offline  
  Reply With Quote
Old 01-24-2006, 10:53 PM   · #3
blackwizard
Account Suspended
 
Location: India
Trader Rating: (8)
Join Date: Oct 2005
Posts: 636
NP$: 15.35 (Donate)
blackwizard is a jewel in the roughblackwizard is a jewel in the roughblackwizard is a jewel in the rough
THanx a lot! you are welcome to ask suggestions on ur site. I may try to answer
blackwizard is offline   Reply With Quote
Closed Thread

NamePros is a revenue sharing forum.

Thread Tools

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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Good Article: An SEO Checklist Ferman Search Engines 2 05-28-2005 10:51 AM
Why can't I get clicks majinbuu1023 Google Adsense 43 04-15-2005 09:24 PM
Basic HTML Tutorial webgear Webmaster Tutorials 8 04-02-2005 02:20 PM
cannot find script sickle Web Design Discussion 5 04-03-2004 06:36 PM

Site Sponsors
http://www.mobisitetrader.com/ http://www.mobisitetrader.com/ Arcade Script
Advertise your business at NamePros
All times are GMT -7. The time now is 07:57 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0