Integrate ConnectBox into Your Web Page

 

ConnectBox is a simple form, which allows the client to simply enter the session code and click Connect. Then it automatically offers the latest appropriate version of ISL Light Client for download and automatically establishes the connection, when the client runs it.

Example

You can find the ConnectBox on ISL Online join page. Here is a simple example how to include the ConnectBox to your webpage.


Step 1

Open your web page in a browser


Step 2

Open the source code for your web page.


Step 3

<script type="text/javascript" src="https://www.islonline.net/webapi/api.js?libs=join"></script> 
<div class="isl-connect-form">    
    <form id="isl-connect-form" action="#" method="get" onsubmit="return isl_connect();">         
        <fieldset>             
            <legend>Enter your session code and click Connect</legend>        
            <div>                 
                <label for="isl-code-field">Session code</label>           
                <input type="text" name="code" id="isl-code-field" value="" />
            </div>             
            <input type="submit" name="submit" value="Connect" />         
        </fieldset>     
    </form>     
    <div id="isl-feedback"></div> 
</div> 
<script type="text/javascript">     
    function isl_connect() {
        var doc = document,
            f = doc.getElementById('isl-connect-form'),
            r = doc.getElementById('isl-feedback'),
            is_msie = navigator.userAgent.indexOf('MSIE') >= 0,
            b = null;

        ISLOnline.Join.getSessionInfoByCode(
            f.code.value,
            function (info) {
                r.className = 'isl-success';
                r.innerHTML = 'Connecting to session ' + info.getAttribute('sessionCode');
                if (is_msie) {
                    r.innerHTML += ', please click the button below:<br />';
                    r.appendChild(doc.createElement('br'));
                    var b = doc.createElement('input');
                    b.type = 'button';
                    b.name = 'join';
                    b.value = 'Start';
                    b.onclick = function () {
                        info.join();
                    };
                    r.appendChild(b);
                } else {
                    info.join();
                }
            },
            function (error) {
                r.className = 'isl-error';
                r.innerHTML = 'Invalid session code!';
                /* comment the line above and uncomment the line below if you wish to display the error that is sent by the server */
                //r.innerHTML += error.getDescription();
            }
        );
        return false;
    } 
</script>

Copy the following code and paste it to the desired location in the code of your webpage.


Step 4

Refresh the web page in  the browser and you should see the ConnectBox.


Step 5

To join an ISL Light session, enter the session code into the ConnectBox box and click the "Connect" button.


Step 6

ISL Light Client application will download from the webpage as an executable.  Click "Save".


Step 7

Click "Run" and ISL Light Client will automatically connect to the Remote Desktop session started by the supporter.


Step 8

You have successfully integrated ConnectBox in your web page. For more information regarding more advanced webpage integration, you can view the following help page: Advanced web page integration.


Was this article helpful?