Hi
I am setting up a terminal services login page that is called with the following url
this is supposed to open a full screen terminal services session, but what happens is a default 800 x 600 screen with a black border to the full screen resolution.
The default.htm and connect.asp page codes are below. What I want to do is to launch into a full screen (no borders) session (as the option in default.htm allows) without having the user fill in the form, just click on the url.
TIA
Webflex
default.htm
connect.asp
I am setting up a terminal services login page that is called with the following url
Code:
<a target="_blank" href="[URL unfurl="true"]http://address/tsweb/connect.asp?server=servername&Fs=1&">[/URL]
this is supposed to open a full screen terminal services session, but what happens is a default 800 x 600 screen with a black border to the full screen resolution.
The default.htm and connect.asp page codes are below. What I want to do is to launch into a full screen (no borders) session (as the option in default.htm allows) without having the user fill in the form, just click on the url.
TIA
Webflex
default.htm
Code:
<html>
<head>
<title>Connect to Terminal Server</title>
<style type="text/css" media="screen">
p { color:"#000000"; font-family: "Verdana, Arial, Helvetica"; font-size:"65%"}
h1 { font-size: 100%; font-family: verdana, arial, helvetica; font-weight: bold;
margin-top: 0em;}
p.indent { margin-left: 3em; margin-top: .5em; line-height: 1.25em; margin-bottom: .2em; margin-right: 1em;}
.button {
FONT-FAMILY: Verdana, Helvetica, Arial, San-Serif;
font-weight:normal;
font-size:70%;
color:#000000;
background-color:#ffffff;
border-color:#6699ff;
margin-top:6pt;
margin-left: .5em;
}
.topspace {margin-top: .08em; }
</style>
</head>
<body bgcolor="#ffffff">
<script language="vbscript">
sub checkClick
if Document.all.Check1.Checked then
Document.all.tableLogonInfo.style.display = ""
Document.all.editUserName.Disabled = false
Document.all.editDomain.Disabled = false
else
Document.all.tableLogonInfo.style.display = "none"
Document.all.editUserName.Disabled = true
Document.all.editDomain.Disabled = true
end if
end sub
sub btnLogin
'Create connection URL and redirect to login page
conUrl = "connect.asp"
'server
if not Document.all.Server.value = "" then
conUrl = conUrl + "?Server=" & Document.all.Server.value & "&"
else
conUrl = conUrl + "?Server=" & Document.location.hostname & "&"
end if
bAutoLogon = FALSE
if Document.all.CheckBoxAutoLogon.checked then
bAutoLogon = TRUE
end if
if bAutoLogon then
conUrl = conUrl + "UserName=" & Document.all.UserName.Value & "&"
conUrl = conUrl + "Domain=" & Document.all.Domain.Value & "&"
end if
'resolution width-height
select case document.all.comboResolution.value
case "1"
conUrl = conUrl + "FS=" & 1 & "&"
resWidth = screen.width
resHeight = screen.height
case "2"
resWidth = "640"
resHeight = "480"
case "3"
resWidth = "800"
resHeight = "600"
case "4"
resWidth = "1024"
resHeight = "768"
case "5"
resWidth = "1280"
resHeight = "1024"
case "6"
resWidth = "1600"
resHeight = "1200"
end select
conUrl = conUrl + "rW=" & resWidth & "&"
conUrl = conUrl + "rH=" & resHeight & "&"
'go to the login page
Window.Navigate(conUrl)
end sub
</script>
<!--
-->
<a href="[URL unfurl="true"]http://www.microsoft.com/windows2000"><img[/URL] border="0" src="win2000l.gif" align="left" alt="Windows2000 logo" width="198" height="124"></a><a href="[URL unfurl="true"]http://www.microsoft.com/windows2000"><img[/URL] border="0" src="win2000r.gif" align="top" width="253" height="76" alt="Windows2000 logo"></a><br>
<h1>Terminal Services Web Connection</h1>
<br>
<table border="0" width="640" cellspacing="0" cellpadding=0 style="margin-top: -1em;">
<!-- Graphic bar row -->
<tr>
<td width="50%"></td>
<td colspan=3 align="left" valign="middle"><img src="bluebarh.gif" alt="blue bar graphic" width="325" height="8"></td>
</tr>
<!-- Row 1 -->
<tr>
<!-- Column 1 spans 4 rows -->
<td valign="top" width="50% " rowspan="4">
<p class=indent>Type the name of the Terminal server you want to use, select the screen size for your connection, and then click <b>Connect</b>.</p>
<p class=indent>When the connection page opens, you can add it to your Favorites for easy connection to the same Terminal server.</p>
</td>
<!-- Column 2 spans 4 rows-->
<td rowspan=4 valign="top" align="left"><img src="bluebarv.gif" alt="blue bar graphic" border=0 width="8" height="330">
</td>
<!-- Column 3 -->
<td width="10%" valign="middle">
<label accessKey="S" for="editServer">
<br><p align="right"> <u>S</u>erver:</label></p>
</td>
<!-- Column 4 -->
<td width="40%" valign="bottom">
<br> <input type="text" name="Server" size="41" id="editServer">
</td>
</tr>
<!-- Row 2 -->
<tr>
<!-- Column 3 -->
<td valign="middle">
<p align="right"><label accessKey="Z" for="comboRes" class="sizespace">Si<u>z</u>e:</p></td>
<!-- Column 4 -->
<td valign="bottom"> <select size="1" name="comboResolution" id=comboRes class="topspace">
<option selected value="1">Full-screen</option>
<option value="2">640 by 480</option>
<option value="3">800 by 600</option>
<option value="4">1024 by 768</option>
<option value="5">1280 by 1024</option>
<option value="6">1600 by 1200</option>
</select> </label>
</td>
</tr>
<!-- Row 3 -->
<tr>
<!-- Column 3 -->
<td></td>
<!-- Column 4 -->
<td align="bottom">
<p class=topspace> <input type="checkbox" name="CheckBoxAutoLogon" ID=Check1 value="OFF" onclick = "checkClick"><label for="Check1" accesskey="l">Send <u>l</u>ogon information for this connection </label><br>
<span ID="tableLogonInfo" style="display: none">
<p align="right" class=topspace>
<br>
<u>U</u>ser name:
<label accessKey="U" for="editUserName"><input type="text" name="UserName" id=editUserName size="25"></label><br>
<u>D</u>omain:
<label accessKey="D" for="editDomain">
<input type="text" name="Domain" id=editDomain size="25"></label></p></span>
<input type="submit" value="Connect" name="ButtonLogin" OnClick=BtnLogin class="button">
</td>
</tr>
<!-- Row 4 -->
<tr>
<!-- Column 3 -->
<td height="215"> </td>
<!-- Column 4 -->
<td> </td>
</tr>
</table>
</body>
</html>
connect.asp
Code:
<html>
<head>
<title> Terminal Services Connection to <%Response.Write Request.QueryString("Server")%></title>
</head>
<body>
<script language="vbscript" >
<!--
const FullScreenWarnTxt1 = "Your current security settings do not allow automatically switching to fullscreen mode."
const FullScreenWarnTxt2 = "You can use ctrl-alt-pause to toggle your terminal services session to fullscreen mode"
const FullScreenTitleTxt = "Terminal Services Connection "
Const ErrMsgText = "Error connecting to terminal server: "
sub window_onLoad()
If not "<%Response.Write Request.QueryString("Server")%>" = "" then
srvName = "<%Response.Write Request.QueryString("Server")%>"
else
srvName = Document.location.hostname
end if
MsTsc.Server = srvName
Document.all.srvNameField.innerHtml = srvName
MsTsc.Domain = "<%Response.Write Request.QueryString("Domain")%>"
MsTsc.UserName = "<%Response.Write Request.QueryString("UserName")%>"
if "<% Response.Write Request.QueryString("FS") %>" = "1" then
if MsTsc.SecuredSettingsEnabled then
MsTsc.SecuredSettings.FullScreen = "<% Response.Write Request.QueryString("FS") %>" = "1"
else
msgbox (FullScreenWarnTxt1 & vbCrLf & FullScreenWarnTxt2 )
end if
end if
MsTsc.FullScreenTitle = FullScreenTitleTxt & "(" & "<%Response.Write Request.QueryString("Server")%>" & ")"
MsTsc.Connect()
end sub
-->
</script>
<center>
<table>
<tr>
<OBJECT language="vbscript" ID="MsTsc"
CLASSID="CLSID:1fb464c8-09bb-4017-a2f5-eb742f04392f"
CODEBASE="mstscax.cab#version=5,0,2221,1"
WIDTH=<% resWidth = Request.QueryString("rW")
if resWidth < 200 or resWidth > 1600 then
resWidth = 800
end if
Response.Write resWidth %>
HEIGHT=<% resHeight = Request.QueryString("rH")
if resHeight < 200 or resHeight > 1200 then
resHeight = 600
end if
Response.Write resHeight %>>
</OBJECT>
</tr>
<tr>
<br>
<font size="1" color="#000000" face="Verdana, Arial, Helvetica">
You are logged in to <i><span id="srvNameField"></span></i></font><br>
</tr>
<script language="VBScript">
<!--
sub MsTsc_OnDisconnected(disconnectCode)
if not disconnectCode = 2 then
msgbox ErrMsgText & MsTsc.Server
end if
'redirect back to login page
Window.Navigate("default.htm")
end sub
-->
</script>
</table>
</center>
</body>
</html>