- /* Populate the 'target' DOM element with default UI */
- if (!target) {
- target = $D('vnc');
- } else if (typeof target === 'string') {
- target = $D(target);
- }
-
- if ((!document.createElement('canvas').getContext) &&
- window.ActiveXObject) {
- // Suggest Chrome frame for Internet Explorer users
- html += '<center><div style="text-align: left; width: 400px">';
- html += ' You are using a version of Internet Explorer ';
- html += ' that does not have HTML5 Canvas support. ';
- html += ' To use noVNC you must use a browser with HTML5 ';
- html += ' Canvas support or install ';
- html += ' <a href="http://google.com/chromeframe" target="cframe">';
- html += ' Google Chrome Frame.</a>';
- html += '</div></center>';
- target.innerHTML = html;
- return;
- }
-
- html += '<div id="VNC_controls">';
- html += ' <ul>';
- html += ' <li>Host: <input id="VNC_host"></li>';
- html += ' <li>Port: <input id="VNC_port"></li>';
- html += ' <li>Password: <input id="VNC_password"';
- html += ' type="password"></li>';
- html += ' <li><input id="VNC_connect_button" type="button"';
- html += ' value="Loading" disabled></li>';
- html += ' </ul>';
- html += '</div>';
- html += '<div id="VNC_screen">';
- html += ' <div id="VNC_status_bar" class="VNC_status_bar" style="margin-top: 0px;">';
- html += ' <table border=0 width=100%><tr>';
- html += ' <td><div id="VNC_status">Loading</div></td>';
-
- // Mouse button selectors for touch devices
- html += ' <td width=1%><div class="VNC_buttons_right">';
- html += ' <nobr><span id="VNC_mouse_buttons" style="display: none;">';
- html += ' <input type="button" class="VNC_status_button"';
- html += ' id="VNC_mouse_button1" value="L" onclick="UI.setMouseButton(1);"';
- html += ' ><input type="button" class="VNC_status_button"';
- html += ' id="VNC_mouse_button2" value="M" onclick="UI.setMouseButton(2);"';
- html += ' ><input type="button" class="VNC_status_button"';
- html += ' id="VNC_mouse_button4" value="R" onclick="UI.setMouseButton(4);">';
- html += ' <input type="button" id="showKeyboard" onclick="showkeyboard()" value="Keyboard" />';
- html += ' </span></nobr></div></td>';
-
- // Settings drop-down menu
- html += ' <td width=1%><div class="VNC_buttons_right">';
- html += ' <input type=button class="VNC_status_button" value="Settings"';
- html += ' id="menuButton"';
- html += ' onclick="UI.clickSettingsMenu();">';
- html += ' <span id="VNC_settings_menu"';
- html += ' onmouseover="UI.displayBlur();"';
- html += ' onmouseout="UI.displayFocus();">';
- html += ' <ul>';
- html += ' <li><input id="VNC_encrypt"';
- html += ' type="checkbox"> Encrypt</li>';
- html += ' <li><input id="VNC_true_color"';
- html += ' type="checkbox" checked> True Color</li>';
- html += ' <li><input id="VNC_cursor"';
- html += ' type="checkbox"> Local Cursor</li>';
- html += ' <li><input id="VNC_shared"';
- html += ' type="checkbox"> Shared Mode</li>';
- html += ' <li><input id="VNC_connectTimeout"';
- html += ' type="input"> Connect Timeout (s)</li>';
- html += ' <hr>';
-
- // Stylesheet selection dropdown
- html += ' <li><select id="VNC_stylesheet" name="vncStyle">';
- html += ' <option value="default">default</option>';