Hvordan blander jeg Java ind i mine ASP Scripts.
Hejsa, jeg har en countdown programmering som jeg gerne vil have mine asp script til at køre sammen med. hvordan flytter jeg f.eks. <%=now%> ovre i javaen.<font><b><font size="1" face="Tahoma"><span style="text-transform: uppercase"><SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
dateFuture = new Date(2008,1,11,23,59,59);
function GetCount(){
dateNow = new Date();
amount = dateFuture.getTime() - dateNow.getTime();
delete dateNow;
if(amount < 0){
document.getElementById('countbox').innerHTML="SLUT";
}
else{
days=0;hours=0;mins=0;secs=0;out="";
amount = Math.floor(amount/1000);
days=Math.floor(amount/86400);
amount=amount%86400;
hours=Math.floor(amount/3600);
amount=amount%3600;
mins=Math.floor(amount/60);
amount=amount%60;
secs=Math.floor(amount);
if(days != 0){out += days +" Dag"+((days!=1)?"e":"")+", ";}
if(days != 0 || hours != 0){out += hours +" time"+((hours!=1)?"r":"")+", ";}
if(days != 0 || hours != 0 || mins != 0){out += mins +" Minut"+((mins!=1)?"ter":"")+", ";}
out += secs +" Sekunder";
document.getElementById('countbox').innerHTML=out;
setTimeout("GetCount()", 1000);
}
}
window.onload=function(){GetCount();}
</script>
<div id="countbox"></div>
</span></font></b>