2 Replies - 901 Views - Last Post: 06 March 2009 - 06:01 AM

#1 pityocamptes  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 31
  • Joined: 24-February 09

Need some help with Script and Inline Text running through Script

Posted 05 March 2009 - 12:35 PM

I need some help with this. Basically I want ONLY the last word of my text to run through the Script that makes it glow. The problem I am having at the moment is that when I use DIV tags to isolate the last word in the displayed text it drops it down (carriage return). I do not want this. I have tried SPAN tages but the Script will not work with those. I borrowed the "glow" Script from online, and have modified it for my use. Perhaps someone could help me so that the text sentence is ALL in line with the last word going through the glow/flicker Script?



</head>
<body onload="Redirect('Welcome.aspx'); doThing(); animate('highlight', '#FFFFFF')">
	<form id="form1" runat="server">
	
		 
		<div id="box4">
			<div id="flicker">
				All that
					<span id="red">Glitters</span> is 
					<span id="green">NOT </span> 
					<span id="gold">Gold</span>
			</div>				   
		</div>
	
	<script src="../script/doThing.js" type="text/javascript"></script>
	
	<div class="info"> 
		<span id="highlight">You will be redirected to the homepage, when	the timer reaches zero.</span>
	</div> 


// JScript File

// set the rate of the display in milliseconds

var rate = 500


// do not edit below this line
// ============================

var i = 0
var F = 'F1'
function doThing(){
   if (document.getElementById&&document.all) {   
	  ok =  true
	  i++;
	  if (i==1) F = 'F1'
	  if (i==2) F = 'F2'
	  if (i==3) F = 'F3'  
	  flicker.className=F
	  if (i > 2) i = 0
	  timer=setTimeout('doThing()', rate)
   }		 
}

html, body
{
	background-color:Black;
	background-image:url(../images/Project1.png);
	background-position:center;
	background-repeat:no-repeat;
	height:100%;
	padding:0%;
	margin:0%;
}

#imgNuke
{
	background-repeat:no-repeat;	
	background-position:center;	
	height:100%;
	padding:0%;
	margin:0%;

}

.Bio
{
	position:absolute;
	Width:5%;
	Height:5%;	
	margin-left:590px;
	margin-top:500px;	
}


#flicker
{
	color:Blue;
	font-family:Times New Roman;
	font-size:50px;
}

.counter
{
   position:absolute;
   top:339px;
   left:620px;
   color:#FFFAFA;
   font-size:50pt;
   font-weight:100;
   background-color:Transparent;
}

.info
{
   position:absolute;
   top:75%;
   left: 380px;
   font-size:larger;
   width:75%;
   margin-top: 2em;
   color:Blue;
   font-family:Times New Roman;
}

.F1 
{
	filter: glow(Color:#FF8000,Strength:10);
	opacity: .6;
	width:auto;
	height:10px;
}
	 
.F2 
{
	filter: glow(Color:#00FF00,Strength:9);
	opacity: .5;
	width:auto;
	height:10px;
}
	 
.F3 
{
	filter: glow(Color:#0080FF,Strength:12);
	opacity: .7;
	width:auto;
	height:10px;
}

#box4
{
	display:inline;
	position:absolute;
	left:100px;
	top:40px;
	font-weight:bold;
	font-size:50px;
	font-family:Times New Roman;
	color:Blue;
	
}

#red
{
	display:inline;
	font-weight:bold;
	font-size:50px;
	font-family:Times New Roman;
	color:Red;
}

#green
{
	display:inline;
	font-weight:bold;
	font-size:50px;
	font-family:Times New Roman;
	color:#00FF00;
}

#gold
{
	display:inline;
	font-weight:bold;
	font-size:50px;
	font-family:Times New Roman;
	color:#FFD700;
}





Is This A Good Question/Topic? 0
  • +

Replies To: Need some help with Script and Inline Text running through Script

#2 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1642
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Need some help with Script and Inline Text running through Script

Posted 05 March 2009 - 05:47 PM

This has nothing to do with ASP.NET. Moved to Javascript forum :)
Was This Post Helpful? 0
  • +
  • -

#3 CTphpnwb  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 3105
  • Posts: 10,903
  • Joined: 08-August 08

Re: Need some help with Script and Inline Text running through Script

Posted 06 March 2009 - 06:01 AM

Looks more like a css issue to me. The box4 div has a position defined, and flicker does not. It makes sense to me that flicker would appear just below box4 when it's called from within the box4 tags.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1