Support Overview


Client API Usage Examples

Upgrade Information


New Release History

You are here:   Visualware >   MyConnection Server >   Support >   Client API Usage Examples >   Passing results to a new tab and color coding

Passing results to a new tab and color coding

The example below passes the results of the test to a JavaScript method. This method analyzes the results, for color coding, and displays them in a table in a new tab on test completion.

Code Required

The code below just needs to be copied into a web page at the position the applet is to appear. The only change that will be needed is the codebase, highligted in red below. This should be changed to the address of your MyConnection Server installation.

The code in blue is the JavaScript call. The method name, passResults, is used to pass the results of the test to the JavaScript below.

The testspecid in green also needs to be changed. When a user creates a custom test a unique test id is assinged to it. As this example uses a VoIP and Speed test in the same applet it was necessary to create a custom test. The test ID in this test is unique to the Visualware MCS engine.

<applet mayscript name="mcs" code="myspeedserver/applet/myspeed.class"
codebase="" width=600 height=400>
<param name="testspecid" value="517">
<param name="permissions" value="all-permissions">
<param name="js" value="passResults($SPEED.DSPEED$,$SPEED.USPEED$,$SPEED.QOS$,$SPEED.AVGRTT$,


The code below is the JavaScript required to mimic this example. Paste this into the <head> </head> HTML tags.

<script type="text/javascript">

function passResults(dspeed,uspeed,qos,avgrtt,upjitter,downjitter,mos) {

var results_url = "results.html?"; //This is the location of the page that is to show the results
results_url += "dspeed="+dspeed;
results_url += "&uspeed="+uspeed;
results_url += "&qos="+qos;
results_url += "&avgrtt="+avgrtt;
results_url += "&ujit="+upjitter;
results_url += "&djit="+downjitter;
results_url += "&mos="+mos;,'_blank'); //Uses the results URL to open a new window


MyConnection Server

Online Testing Portal

Visualware Products

Visual IP Trace


© Visualware Inc. 2017 - All Rights Reserved