...

View Full Version : Javascript required



slamdunk
08-25-2010, 02:45 AM
I dont have much experience with javascript. Please provide javascript to create something like the image below:

http://www.coolmicroscope.com/java.jpg

Old Pedant
08-25-2010, 03:38 AM
There's no JavaScript required for that.

In fact, JavaScript would be useless.


<html>
<head>
<script type="text/javascript">
function getElements()
{
var peter=document.getElementsByTagName("input");
alert(peter.length);
}
</script>
<style type="text/css">
table { border: none; font-family: arial; font-size: x-small; }
td { background-color: #0088DD;
color: white;
width: 160px; height: 30px;
vertical-align: top;
margin: 0;
border: solid 3px #003399;
}
th { background-color: #003399;
color: white;
width: 160px; height: 10px;
vertical-align: top; text-align: left;
margin: 0;
border: solid 3px #003399;
}
</style>
</head>
<body>
<table cellpaddin="0" cellspacing="0">
<tr><th>1:00 AM</th></tr>
<tr><td>Client Name</td></tr>
</table>
</body>
</html>
That's not *exactly* what you showed, but if I took a few minutes longer I could get it closer.

slamdunk
08-25-2010, 04:15 AM
There's no JavaScript required for that.

In fact, JavaScript would be useless.


<html>
<head>
<script type="text/javascript">
function getElements()
{
var peter=document.getElementsByTagName("input");
alert(peter.length);
}
</script>
<style type="text/css">
table { border: none; font-family: arial; font-size: x-small; }
td { background-color: #0088DD;
color: white;
width: 160px; height: 30px;
vertical-align: top;
margin: 0;
border: solid 3px #003399;
}
th { background-color: #003399;
color: white;
width: 160px; height: 10px;
vertical-align: top; text-align: left;
margin: 0;
border: solid 3px #003399;
}
</style>
</head>
<body>
<table cellpaddin="0" cellspacing="0">
<tr><th>1:00 AM</th></tr>
<tr><td>Client Name</td></tr>
</table>
</body>
</html>
That's not *exactly* what you showed, but if I took a few minutes longer I could get it closer.

Thanks for the code. Could you please help me format the code below to look like the image below?

http://www.coolmicroscope.com/java.jpg

Things I can't workout are:

1. top and bottom background colors
2. add two blinking text
3. border color same as top background color
4. Opacity like the image


"data:text/html,<html>
<head>

<script type='text/javascript'>
function blinkIt() {
if (!document.all) return;
else {
for(i=0;i<document.all.tags('blink').length;i++){
s=document.all.tags('blink')[i];
s.style.visibility=(s.style.visibility=='visible')?'hidden':'visible';
}
}
}
</script>

<style type="text/css">
html, body {
height: 100%;
width: 100%;
}

body
{
margin : 0px 0px 0px 0px;
border : 0px;
}

table
{
border-collapse: collapse;
width : 100%;
height : 100%;
}

td {
text-align: center;
vertical-align : top;

font: bold 11px arial;

color:rgb(0,0,0);
background-color:rgb(255,255,0);

}
</style>
</head>
<body onload=\"setInterval('blinkIt()',500)\">
<table><tr><td><blink>"
Some Text
"</td></tr></table></blink>
</body>
</html>"



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum