PDA

View Full Version : trembling message



mikki
11-26-2004, 01:10 PM
i recently copied and pasted "DD Trembling Message" into a HTML code page on Dreamweaver. It did not work. Can you look at code and see what is wrong?<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style>
.jc{
position:relative;
}
</style>

<script language="JavaScript1.2">

//Trembling message script- Dynamic Drive (www.dynamicdrive.com)
//For full source code, 100's more DHTML scripts, and TOS,
//visit http://www.dynamicdrive.com

var ns6=document.getElementById&&!document.all
var ie=document.all

var customcollect=new Array()
var i=0

function jiggleit(num){
if ((!document.all&&!document.getElementById)) return;
customcollect[num].style.left=(parseInt(customcollect[num].style.left)==-1)? customcollect[num].style.left=1 : customcollect[num].style.left=-1
}

function init(){
if (ie){
while (eval("document.all.jiggle"+i)!=null){
customcollect[i]= eval("document.all.jiggle"+i)
i++
}
}
else if (ns6){
while (document.getElementById("jiggle"+i)!=null){
customcollect[i]= document.getElementById("jiggle"+i)
i++
}
}

if (customcollect.length==1)
setInterval("jiggleit(0)",80)
else if (customcollect.length>1)
for (y=0;y<customcollect.length;y++){
var tempvariable='setInterval("jiggleit('+y+')",'+'100)'
eval(tempvariable)
}
}

window.onload=init

</script>
</head>

<body>
<span id="jiggle0" class="jc"><<h3>Feature Title </h3></span>
</body>
</html>

cr3ative
11-26-2004, 02:08 PM
Try removing this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

and see what happens.

cr3ative

mikki
11-26-2004, 05:36 PM
thanks creative, but when i removed the 2 top lines, nothing happened. This is now how it reads. :mad:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style>
.jc{
position:relative;
}
</style>

<script language="JavaScript1.2">

//Trembling message script- Dynamic Drive (www.dynamicdrive.com)
//For full source code, 100's more DHTML scripts, and TOS,
//visit http://www.dynamicdrive.com

var ns6=document.getElementById&&!document.all
var ie=document.all

var customcollect=new Array()
var i=0

function jiggleit(num){
if ((!document.all&&!document.getElementById)) return;
customcollect[num].style.left=(parseInt(customcollect[num].style.left)==-1)? customcollect[num].style.left=1 : customcollect[num].style.left=-1
}

function init(){
if (ie){
while (eval("document.all.jiggle"+i)!=null){
customcollect[i]= eval("document.all.jiggle"+i)
i++
}
}
else if (ns6){
while (document.getElementById("jiggle"+i)!=null){
customcollect[i]= document.getElementById("jiggle"+i)
i++
}
}

if (customcollect.length==1)
setInterval("jiggleit(0)",80)
else if (customcollect.length>1)
for (y=0;y<customcollect.length;y++){
var tempvariable='setInterval("jiggleit('+y+')",'+'100)'
eval(tempvariable)
}
}

window.onload=init

</script>

</head>

<body>
<span id="jiggle0" class="jc"><h3>Feature Title </h3></span>
</body>
</html>

cr3ative
11-26-2004, 07:48 PM
That code works beautifully for me saved as a .htm...

cr3ative

mikki
11-26-2004, 08:37 PM
Creative one small step for mankind. it did not work until i uploaded to browser from dreamweaver. it did not work when i viewed design option in dreamweaver. it had to be uploaded to browser. well, when i get more energy i will trek forward. thank you so much!!! :D :D :D p.s. the energy is back a liitle and i want to try the rollover script. i notice that to insert into the head the script looks like this:

<style type="text/css">

.initial2{font-weight:bold;background-color:lime}

</style>

<script type="text/javascript">
<!--

/***********************************************
* Rollover background-color button Script- Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
etc.................................................................
ion=url
}

//-->
</script>



my html page looks like this in head. where do i insert what do i delete.




<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style>
.jc{
position:relative;
}
</style>

<script language="JavaScript1.2">
etc...................................................




</script>
<head>