Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you tell me why this script is

Status
Not open for further replies.

Drone38

Programmer
Apr 12, 2000
29
0
0
BE
Can you tell me why this script is working under IE 5 and not under Netscape 4.7

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!--
var today = new Date();
function sec()
{
jour=Date.parse(&quot;Jan 1, &quot; + (today.getFullYear() + 1) + &quot; GMT&quot;) - Date.parse(new Date);
return jour/1000;
}

function min()
{
return Math.floor((sec()-hr()*3600-j()*86400)/60);
}

function hr()
{
return Math.floor((sec()-j()*86400)/3600);
}

function j()
{
return Math.floor(sec()/86400)
}

function fs()
{
return Math.floor((sec()-j()*86400-hr()*3600-min()*60));
}

document.write(j()+&quot; jours &quot;);
document.write( (hr()-1<0?23:(hr()-1)) +&quot; heures &quot;);
document.write(min()+&quot; minutes &quot;);
document.write(fs());

</SCRIPT>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top