> Vis os koden! Det burde virke.
Jeg indsætter den nederst i denne post...
> Er indholdet af onload-attributten virkelig den *eneste* forskel på
> forsøgene?
Ja. Da jeg havde kodet det hele færdigt og prøvede at finde fejlen, var de tags
en af de ting jeg tjekkede. Jeg prøvede alle 4 kombinationer, uden at ændre på
andre.
Her kommer koden:
<script language="vbscript">
'alert document.referrer
'Dim CountDown
'CountDown = "6"
'Function Redir()
' if countdown > 0 then
' CountDown = Countdown - 1
' end if
' if countdown = 0 then
' location.href = "
http://www.dania-import.dk/shoppen/welcome.asp"
' end if
'End Function
'SetInterval "Redir()","1000"
</script>
<html>
<head>
<style type="text/css">
hr.ned {
position:relative;
bottom: -37px;
}
p.relativ {
position: relative;
left: -43px;
bottom: -35px;
}
input.invi {
border:0px solid #000000; position:relative;
left: 105px;
bottom: 1px;
background-image: url('none');
font-family: Verdana;
font-size: 12px;
font-weight: bold;
color: #990000;
background-color: #ffffff
}
</style>
<meta http-equiv="Content-Language" content="da">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Kom indenfor!</title>
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!!
http://javascript.internet.com -->
<!-- Ken Tholke, kentholke@firstsaga.com. -->
<!-- Begin
// add as many or as few messages as you would like
var msg=new Array()
msg[0]="<center>Vi prioriterer tryghed</center>";
msg[1]="<center>ved handel over nettet!</center>";
msg[2]="<center>Du kan derfor trygt</center>";
msg[3]="<center> betale med dit Dankort<br> i denne shop -</center>";
msg[4]="<center>ligesom du betaler</center>";
msg[5]="<center>i almindelige forretninger.</center>";
// set your first set of colors. Use as many or as few as you wish.
var colors1=new Array("ffffff", "eeeeff", "ddddff", "ccccff", "bbbbff",
"aaaaff", "9999ff",
"8888ff", "7777ff", "6666ff", "5555ff", "4444ff", "3333ff","2222ff", "1111ff",
"0000ff")
//set your second set of colors
// *** must have exactly the same number of colors as the array above ***
var colors2=new Array("ffffff", "ffeeee", "ffdddd", "ffcccc", "ffbbbb",
"ffaaaa", "ff9999",
"ff8888", "ff7777", "ff6666", "ff5555", "ff4444", "ff3333", "ff2222", "ff1111",
"ff0000")
//set the height of the display in pixels
high=30;
//set the width of the display in pixels
wide=220;
//set the pixel coordinates for the upper left hand corner of the display
Xpos=119;
Ypos=295;
// move the display away from the edges of the background
pad=15;
// set the background color of the display
bgcol="ffffff";
//add a background image if you want.
// *** for no image, just leave empty quotes (ex. cellbg=""; ) ***
cellbg="faderbg.jpg";
// set the font
fntFam="verdana,helvetica,arial";
fntSize=10;
// set how how many seconds you want the message to stay remain at totality.
pause=2.5;
// Do not edit these values below!!!
icolor=0;
mcolor=1;
imsg=0;
spWidth=wide-(2*pad);
totality=false;
glowing=true;
var theMsg="";
var cellcontent="";
pause=pause*1000;
if(cellbg.length>4){cellbg=" background="+cellbg}
else{cellbg="";}
function doPause(){
totality=false; t=setTimeout("changecolor()",pause);
}
function initiate(){
getContentColor();
getMsg();
getCellContent();
if(document.all){
msgbg.innerHTML=cellcontent;
msgfade.innerHTML=theMsg;
msgbg.style.posLeft=Xpos;
msgbg.style.posTop=Ypos;
msgfade.style.posLeft=Xpos+pad;
msgfade.style.posTop=Ypos+pad;
t=setTimeout("changecolor()",50);}
if(document.layers){
document.msgbg.document.write(cellcontent);
document.msgbg.document.close();
document.msgfade.document.write(theMsg);
document.msgfade.document.close();
document.msgbg.left=Xpos;
document.msgbg.top=Ypos;
document.msgfade.left=Xpos+pad;
document.msgfade.top=Ypos+pad;
t=setTimeout("changecolor()",100);}
}
function changecolor(){
if(totality==true){doPause();}
else{
getMsg();
getContentColor();
if(document.all){
msgfade.innerHTML=theMsg;
t=setTimeout("changecolor()",50);}
if(document.layers){
document.msgfade.document.write(theMsg);
document.msgfade.document.close();
t=setTimeout("changecolor()",70);}
}
}
function getFadeColor(){
icolor=icolor-1;
if(mcolor==1){contentcolor=colors1[icolor];}
else{contentcolor=colors2[icolor];}
}
function getGlowColor(){
icolor=icolor+1;
if(mcolor==1){contentcolor=colors1[icolor];}
else{contentcolor=colors2[icolor];}
}
function changemsg(){
if(imsg==msg.length-1){imsg=0; mcolor=1;}
else if(imsg != msg.lenght-1 && mcolor==1){imsg=imsg+1; mcolor=0;}
else{imsg=imsg+1; mcolor=1;}
}
function getContentColor(){
if(icolor==colors1.length-1 && glowing==true){
getFadeColor(); glowing=false; totality=true;}
else if(icolor < colors1.length && glowing==true){
getGlowColor();}
else if(icolor < 1 && glowing==false){changemsg(); getGlowColor();
glowing=true;}
else{getFadeColor();}
}
function getMsg() {
theMsg="<span style='font-size:"+fntSize+"pt; font-family:"+fntFam+";
width:"+spWidth+";'>"
theMsg+="<B><font color="+contentcolor+">"+msg[imsg]+"</font></B> "
theMsg+="</span>"
}
function getCellContent(){
cellcontent="<TABLE height="+high+
" width="+wide+" bgcolor="+bgcol+" cellpadding=0
cellspacing=0><TR><TD"+cellbg+"> </TD></TR></TABLE>"}
// End -->
</script>
<script type="text/javascript">
var timer = null
function stop()
{
clearTimeout(timer)
}
function start()
{
var time = new Date()
var hours = time.getHours()
var minutes = time.getMinutes()
hours = ((hours < 10) ? "0" : "") + hours
minutes=((minutes < 10) ? "0" : "") + minutes
var seconds = time.getSeconds()
seconds=((seconds < 10) ? "0" : "") + seconds
var clock = hours + ":" + minutes + ":" + seconds
document.forms[0].display.value = clock
timer = setTimeout("start()",1000)
}
</script>
</head>
<body onLoad="initiate();start();" onunload="stop()">
<div align="center">
<center>
<table border="4" cellpadding="0" cellspacing="0" style="border-collapse:
collapse" bordercolor="#000080" width="838" id="AutoNumber1" height="57">
<tr>
<td width="286" height="524" bordercolor="#FFFFFF">
<p align="center">
</p>
<p align="center">
<b>
<font size="5" color="#000099" face="Eurostile">Velkommen til
<br>
Dania-Import<br>
<br>
</font>
<i>
<font color="#000099" face="Verdana">
<font size="2">"Shoppen hvor man får<br>
mest for mindst"</font><br>
</font></i></b></p>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0"
style="border-collapse: collapse" bordercolor="#111111" width="94%"
id="AutoNumber2" height="74">
<tr>
<td width="9%" height="74">
<p align="center">
<br>
</body><p align="center">
<br>
<DIV id=msgbg style="position: absolute;"></DIV>
<DIV id=msgfade style="position: absolute;"></DIV>
<p><p align="center">
<br>
</td>
<td width="19%" height="74">
<p align="center"> </p>
<p> </td>
<td width="49%" height="74">
<p align="center">
<b>
<font color="#000099" face="Verdana">
<img border="0" src="images/dg-logo2.jpg"><br>
<br>
<br>
<br>
<br>
</font></b></td>
<td width="18%" height="74">
<p align="center"><br>
<br>
</td>
<td width="9%" height="74">
</td>
</tr>
</table>
</center>
</div>
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!!
http://javascript.internet.com -->
<!-- Begin
var Today=new Date();
var ThisDay=Today.getDay();
var ThisDate=Today.getDate();
var ThisMonth=Today.getMonth()+1;
var ThisYear=Today.getFullYear(); //included if you wish to insert the year
function DayTxt (DayNumber) {
var Day=new Array();
Day[0]="Søndag";
Day[1]="Mandag";
Day[2]="Tirsdag";
Day[3]="Onsdag";
Day[4]="Torsdag";
Day[5]="Fredag";
Day[6]="Lørdag";
return Day[DayNumber];
}
var DayName=DayTxt(ThisDay);
function MonthTxt (MonthNumber) {
var Month=new Array();
Month[1]="Januar";
Month[2]="Februar";
Month[3]="Marts";
Month[4]="April";
Month[5]="Maj";
Month[6]="Juni";
Month[7]="Juli";
Month[8]="August";
Month[9]="September";
Month[10]="Oktober";
Month[11]="November";
Month[12]="December";
return Month[MonthNumber];
}
var MonthName=MonthTxt(ThisMonth);
var d = new Date();
var h = d.getHours();
document.write("<TABLE ALIGN=center BORDER=3 BGCOLOR=WHITE WIDTH=80 HEIGHT=90
align=left>"+"<TD>"+"<p align=center>"+"<font size=-2 >"+DayName+"<br>"+"<font
color=#990000 size=+3
>"+ThisDate+"</font>"+"<br>"+MonthName+"<br>"+"</b>"+"</font>"+"</p>"+"</TD>"+"
</TR>"+"</TABLE>");
if (h < 4) document.write("<P ALIGN=center><font size=+1 color=#990000>"+"God
nat og sov godt!<br>- men shoppen er fortsat åben!"+"</font>"+"</P>");
else if (h < 9) document.write("<P ALIGN=center><font size=+1
color=#990000>"+"God morgen!"+"</font>"+"</P>");
else if (h < 12) document.write("<P ALIGN=center><font size=+1
color=#990000>"+"God formiddag!"+"</font>"+"</P>");
else if (h < 18) document.write("<P ALIGN=center><font size=+1
color=#990000>"+"God eftermiddag!"+"</font>"+"</P>");
else if (h < 24) document.write("<P ALIGN=center><font size=+1
color=#990000>"+"God aften!"+"</font>"+"</P>");
// End -->
</script>
<p align="center"><b><font color="#000080" face="Verdana" size="2">Klokken er
nu <% 'response.write(FormatDateTime(now(),vbshorttime))%>
<form>
<input class="invi" type="text" name="display" size="8">
</form>
</font></b></p>
</td>
<td width="529" height="210" bordercolor="#FFFFFF"
bgcolor="#FFFFFF" rowspan="2">
<p align="center">
<a href="default.asp"><img border="0"
src="images/di-logo-welcome2.jpg"></a> <br>
<font color="#75003A" face="Arial" size="2">
<br>
<br>
<br>
</font>
<b><a style="text-decoration: none" href="default.asp">
<font color="#000080" face="Verdana" size="1">Log-on her
eller klik på logoet<br>
- og kom indenfor!</font></a></b></p>
<p align="center">
<br>
<font color="#000080"> <font face="Arial" size="1"><br>
</font> <font face="Arial" size="1">Site
ses bedst i 1024 x 768<br>
</font></font></p>
</td>
<td width="15" height="210" bordercolor="#FFFFFF"
rowspan="2">
</td>
</tr>
<tr>
<td width="286" height="57" bordercolor="#FFFFFF">
<p align="center"></td>
</tr>
</table>
</center>
</div>
</body>
</html>
--
Vil du lære at kode HTML, XHTML, CSS, SSI eller ASP?
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! =>
http://www.html.dk/tutorials