Not a Member Yet,
Click here to Register
How do you like the new design?
It's cool, great job
[tally: 70%] 70%
It's okay
[tally: 20%] 20%
Its OK but I liked the old layout better
[tally: 0%] 0%
Please bring the old one back
[tally: 10%] 10%

votes: 10

ID: 487
Viewed: 2935
Added: Sep 03, 2002
Version:
Snippet uploaded by: Dr. Web
Written By: Dr. Web
Demo: Sorry, no demo



User Rated at: 0 Stars
Rate This:

Thank you for your vote. Please wait...

It appears you already voted for this snippet

It appears your vote value was empty

times the browser on how fast it can count and display results. Originally N6 was supposed to outperform IE, but I wanted to test this theory in a simple way. This test doesn't mean that N6 is in fact slower, just that it appears to be so here.

<!---Head--->
<SCRIPT LANGUAGE="JavaScript">
<!--
var codename=navigator.appCodeName
var appname=navigator.appName
var appversion=navigator.appVersion

function check_browser(){
if (document.all) {
document.taskform.browser.value="Internet Explorer Detected";
}
else if (document.layers) {
document.taskform.browser.value="Netscape Navigator Detected";
}
else if (document.getElementById) {
document.taskform.browser.value="Netscape 6 Detected";
}
else {
document.taskform.browser.value="Unrecognized Browser Detected";
}

document.taskform.test1.value="";
document.taskform.test2.value="";
document.taskform.test3.value="";
document.taskform.average.value="";

document.taskform.message.value="Checking Browser.........";
document.taskform.codename.value=codename;
document.taskform.version.value=appversion;
var TimerNew = setTimeout('document.taskform.message.value="Calculating First Run...";', 1500);
var TimerNew = setTimeout('timer1();', 2000);
}


function timer1(){
//begin timer
startdate=new Date();
startseconds=startdate.getTime();
for (i=0; i<10000; i++) {
window.status=i;
}
var TimerNew = setTimeout('', 1000);
//end timer
enddate=new Date();
endseconds=enddate.getTime();
//compute time elapsed in seconds.
difference=((endseconds/1000)-(startseconds/1000));
document.taskform.test1.value=difference;
document.taskform.message.value="Calculating Second Run...";
var TimerNew = setTimeout('timer2();', 20);
}

function timer2(){
//begin timer
startdate=new Date();
startseconds=startdate.getTime();
for (i=0; i<10000; i++) {
window.status=i;
}
var TimerNew = setTimeout('', 1000);
//end timer
enddate=new Date();
endseconds=enddate.getTime();
//compute time elapsed in seconds.
difference=((endseconds/1000)-(startseconds/1000));
document.taskform.test2.value=difference;
document.taskform.message.value="Calculating Third Run...";
var TimerNew = setTimeout('timer3();', 20);
}

function timer3(){
//begin timer
startdate=new Date();
startseconds=startdate.getTime();
for (i=0; i<10000; i++) {
window.status=i;
}
var TimerNew = setTimeout('', 1000);
//end timer
enddate=new Date();
endseconds=enddate.getTime();
//compute time elapsed in seconds.
difference=((endseconds/1000)-(startseconds/1000));
document.taskform.test3.value=difference;
document.taskform.message.value="Calculating Average Time...";
var TimerNew = setTimeout('average_it();', 20);
}


function average_it(){
one=document.taskform.test1.value;
two=document.taskform.test2.value;
three=document.taskform.test3.value;
total=((parseFloat(one))+(parseFloat(two))+(parseFloat(three)));
average=total/3;
var TimerNew = setTimeout('complete();', 2000);
}

function complete(){
document.taskform.message.value="Test Complete.";
document.taskform.average.value=average;
}

// -->
</SCRIPT>

<!---Body--->


 <form name="taskform" action="" method="">
<table width="50%" height="100%" cellpadding=8 cellspacing=0 border=0>
<tr>
<td> </td>
</tr>
<tr>
<td align="left" bgcolor="#009900"><input type="text" size=28 name="codename" disabled onfocus="this.blur()" value="">   <b>Code Name</b></td>
</tr>
<tr>
<td align="left" bgcolor="#009900"><input type="text" size=28 name="browser" disabled onfocus="this.blur()" value="">   <b>Browser</b></td>
</tr>
<tr>
<td align="left" bgcolor="#009900"><input type="text" size=48 name="version" disabled onfocus="this.blur()" value="">   <b>OS</b></td>
</tr>
<tr>
<td align="left" bgcolor="#006633"><input type="text" size=28 name="message" disabled onfocus="this.blur()" value="">   <B>Test Progress</b></td>
</tr>
</tr>
<tr>
<td align="left" bgcolor="#009900"><input type="text" size=28 name="test1" disabled onfocus="this.blur()" value="" onchange="javascript:something();">   <b>First Run</b></td>
</tr>
<tr>
<td align="left" bgcolor="#009900"><input type="text" size=28 name="test2" disabled onfocus="this.blur()" value="">   <b>Second Run</b></td>
</tr>
<tr>
<td align="left" bgcolor="#009900"><input type="text" size=28 name="test3" disabled onfocus="this.blur()" value="">   <b>Third Run</b></td>
</tr>
<tr>
<td align="left" bgcolor="#006633"><input type="text" size=28 name="average" disabled onfocus="this.blur()" value="">   <b>Average Time</b></td>
</tr>
<tr>
<td align="center"><input type="button" value="print screen" onclick="window.print();">   <input type="reset" value="reset" onclick="reset();">   <input type="button" value="Test Speed" onclick="check_browser();">
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</form>


No Comments to show

Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.


Replying to a Comment...


Adding your comment. Please wait...

Thanks for adding your comment!. After further review it will be added.

There was a problem adding your comment. Please try again.

Please complete all the fields in the form before sending.

© 2002 - 2017 snippetlibrary.com All Rights Reserved. Conditions