Copying and pasting everything on the right into the HTML of your page (paste it where you would like the applet to appear) will get you 99% of the way there.
The only thing that needs changing is in bold below.
The codebase in this example is set to our server, simply change this entry to your own MyConnection Server address. |
<!-- The Javascript below creates the email body from the results of the speed test -->
<script>
var _ebody;
function addCommas(n) {
var s=""+n;
var len = s.length;
for (var at=len-3; (at>0); at-=3) {
s = s.substring(0,at)+","+s.substring(at);
}
return s;
}
function mys(dspeed,uspeed,qos,rtt,maxp) {
_ebody = "";
_ebody += "Visualware MySpeed Test Results\n\n";
_ebody += "The MySpeed test results below show Speed and Quality measurements\n";
_ebody += "\n";
_ebody += "URL: " + location.href+"\n";
_ebody += "When: " + new Date()+"\n";
_ebody += "Download: " + addCommas(dspeed)+" bps\n";
_ebody += "Upload: " + addCommas(uspeed)+" bps\n";
_ebody += "QOS: " + qos+"%\n";
_ebody += "RTT: " + rtt+" ms\n";
_ebody += "MaxPause: " + maxp+" ms\n";
var s = '<a href="javascript:emailnow()"><b>Click to email these results</b></a><br><br>';
document.getElementById('elink').innerHTML = s;
}
function emailnow() {
document.location.href = "mailto:myspeed@company.com?subject=MySpeed Test Results&body="+escape(_ebody);
}
</script>
<!-- The applet code below displays the MySpeed applet -->
<applet mayscript name="mcs" code="myspeedserver/applet/myspeed.class" archive="/myspeed/myspeed_s_8.jar,/myspeed/plugins_s_8.jar" codebase="http://mcslhr.visualware.com/myspeed" width=600 height=400>
<param name="permissions" value="all-permissions"></param>
<param name="testspecid" value="-2">
<param name="js" value="mys($SPEED.DSPEED$,$SPEED.USPEED$,$SPEED.QOS$,$SPEED.RTT$,$SPEED.MAXPAUSE$)">
</applet>
<!-- The DIV below is where the email link will appear once the test has finished -->
<br><br>
<div id="elink"></div>
|