Countdown Grafisch: Ein java script cputdown

Beitrag lesen

Ich kann Dir einen netten Verlaufsbalken anbieten:

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<title>E-Mail wird gesendet</title>
<meta http-equiv=content-type content="text/html; charset=iso-8859-1">
<meta content="noindex" name="robots">
<meta http-equiv="refresh" content="6; URL=http://forum.de.selfhtml.org/?t=79623&m=461452">

<style type=text/css>A:link {
 COLOR: #c0c0c0; TEXT-DECORATION: none
}
A:visited {
 COLOR: #b2b2b2; TEXT-DECORATION: none
}
A:hover {
 COLOR: #5e5e5e; TEXT-DECORATION: none
}
BODY {
 MARGIN-TOP: 1px; MARGIN-BOTTOM: 1px; MARGIN-RIGHT: 1px; MARGIN-Left: 1px;
}
<!--
#bar, #barbackground{
position:absolute;
left:0;
top:0;
background-color:#000080;
}

#barbackground{
background-color:#c0c0c0;
}

-->
</style>

<SCRIPT type="text/javascript">

//1) Gib hier ein, wie lange der Balken laufen soll:
var duration=5

//2) Hier kannst Du eine Postaction definieren, oder wenn Du den Meta-Refresher benutzt, das auch freilassen:
function postaction(){

}

///Done Editing///
var clipright=0
var widthIE=0
var widthNS=0

function initializebar(){
if (document.all){
baranchor.style.visibility="visible"
widthIE=bar.style.pixelWidth
startIE=setInterval("increaseIE()",50)
}
if (document.layers){
widthNS=document.baranchorNS.document.barbackgroundNS.clip.width
document.baranchorNS.document.barNS.clip.right=0
document.baranchorNS.visibility="show"

startNS=setInterval("increaseNS()",50)
}
}

function increaseIE(){
bar.style.clip="rect(0 "+clipright+" auto 0)"
window.status="Loading..."
if (clipright<widthIE)
clipright=clipright+(widthIE/(duration*20))
else{
window.status=''
clearInterval(startIE)
postaction()
}
}

function increaseNS(){
if (clipright<202){
window.status="Loading..."
document.baranchorNS.document.barNS.clip.right=clipright
clipright=clipright+(widthNS/(duration*20))
}
else{
window.status=''
clearInterval(startNS)
postaction()
}
}

window.onload=initializebar
</SCRIPT>

</head>
<body bgcolor="#6487dc" style="cursor:wait;">
<br><br><br><br><br><br><br><br>
<table cellspacing="3" align=center bgcolor="#c0c0c0" style="cursor:wait; border-style:solid; border-width:1px; BorderColorDark: #5e5e5e">
  <tbody>
  <tr>
    <td bgcolor="#000080" colspan="2"><div style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align="justify"><a href="javascript:self.close()"><img alt="" hspace="0" src="imges/Abschaltflaeche.gif" border="0" align="right" vspace="1"></a><img src="imges/mail_icon.gif" alt=""><font face="MS Sans Serif" size="2" color="#ffffff"><b> E-Mail...</b></font></div></td></tr>
  <tr>
    <td>
      <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align="justify"><font
      face="MS Sans Serif" size="2"></font></p></td>
    <td bgcolor="#c0c0c0"></td></tr>
  <tr>
    <td>
      </td>
    <td bgcolor="#c0c0c0"></td></tr>
  <tr>
    <td>
      </td>
    <td bgcolor="#c0c0c0"></td></tr>
  <tr>
    <td colspan="2">

</td></tr>
  <tr>
    <td bgcolor="#c0c0c0" colspan="2" width="350">
         <div align="center"><img src="imges/Mail.jpg" alt="Vielen Dank. Die Mail wurde versendet." border="0" hspace="13" vspace="13" align="middle"><font face="Verdana" size="2">Vielen Dank. Die Mail wird versendet.</font></div>
         <fieldset><SCRIPT type="text/javascript">
if (document.all){
document.write('<div id="baranchor" style="position:relative;width:350px;height:20px;visibility:hidden;">')
document.write('<div id="barbackground" style="width:350px;height:20px;z-index:9"></div>')
document.write('<div id="bar" style="width:350px;height:20px;z-index:10"></div>')
document.write('</div>')
}

</SCRIPT>
<ilayer name="baranchorNS" visibility="hide" width="350" height="20"><layer
name="barbackgroundNS" width="350" height="20" bgcolor="#c0c0c0" z-index="10"
left="0" top="0"></layer><layer name="barNS" width="350" height="20"
bgcolor="#000080" z-index="11" left="0" top="0"></layer></ilayer></fieldset>

</td></tr></tbody></table>
<br><br>
</body></html>