winston6071
Programmer
Hello
please can someone tell me how to delete the serverfield and the timezonefield in the following code, that the login will work, if i just hide the two fields it tells me on the login that i have to choose a server, is it possible to change only the this file or do i have to go deeper and change maybe the classes????
I want to learn jsp programming, and maybe if someone can tell me how to do this i will find my way easier.
Actually i tried some other things but all the time it tells me that he cannot find the server which he gets with an function directly from the Remedy Server itself.
thanks in forehand for help
<html>
<head>
<title>ARWeb 4.0</title>
<%@ include file="i18n.jsp" %>
<%@ include file="init.jsp" %>
<!--jgxx
<script language="JavaScript">
for(i=0; i < parent.frames.length; ++i)
alert(parent.frames.name);
</script>
-->
<script language="JavaScript1.2">
<!--
function clearForm() {
this.document.login.U.value="";
this.document.login.Pw.value="";
this.document.login.U.focus();
}
function tzSelected(f) {
var selectedTZ = f.TZ.options[f.TZ.selectedIndex].value;
var cookieDate = new Date();
cookieDate.setTime( cookieDate.getTime() + (1000 * 60 * 60 * 24 * 365) );
document.cookie = "TZ=" + selectedTZ + "; expires=" + cookieDate.toGMTString();
}
function doLogin()
{
if (document.login.U.value == ""
{
// retrieve message from arwebres.dll
alert('<%= WaserverUtil.encodeJSQuotedString(ws.OSLoadString(5310)) %>');
this.document.login.U.focus();
return;
}
var numServers = 0;
// pass the server list as a comma separated string
// rather than s=s1&s=s2
var csServers = ""; // comma separated servers
with (document.login.sList)
{
for ( var i = 0; i < length; i++ )
{
if (options.selected)
{
if ( options.text.length > 0 )
{
numServers++;
if (csServers.length != 0)
csServers += ",";
csServers += options.text;
}
}
}
}
if ( numServers == 0 )
{
// retrieve message from arwebres.dll
alert('<%= WaserverUtil.encodeJSQuotedString(ws.OSLoadString(5311)) %>');
this.document.login.sList.focus();
return;
}
// set the variable before doing submit
document.login.s.value = csServers;
document.login.submit();
}
var serverString = "<%= ws.dfltserverlist() %>";
var serverList = serverString.split(","
var tzString = "ARWeb Application Server Timezone,ARWeb Application Server Timezone,GMT,Greenwich Mean Time,ECT,European Central Time(Europe/Paris),EET,Eastern European Time(Europe/Istanbul),ART,Egypt Standard Time(Africa/Cairo),EAT,Eastern African Time(Asia/Riyadh),MET,Middle East Time(Asia/Tehran),NET,Near East Time(Asia/Yerevan),PLT,Pakistan Lahore Time(Asia/Karachi),IST,India Standard Time(Asia/Calcutta),BST,Bangladesh Standard Time(Asia/Dacca),VST,Vietnam Standard Time(Asia/Bangkok),CTT,China Taiwan Time(Asia/Shanghai),JST,Japan Standard Time(Asia/Tokyo),ACT,Australia Central Time(Australia/Darwin),AET,Australia Eastern Time(Australia/Sydney),SST,Solomon Standard Time(Pacific/Guadalcanal),NST,New Zealand Standard Time(Pacific/Fiji),MIT,Midway Islands Time(Pacific/Apia),HST,Hawaii Standard Time(Pacific/Honolulu),AST,Alaska Standard Time(America/Anchorage),PST,Pacific Standard Time(America/Los_Angeles),PNT,Phoenix Standard Time(America/Phoenix),MST,Mountain Standard Time(America/Denver),CST,Central Standard Time(America/Chicago),EST,Eastern Standard Time(America/New_York),IET,Indiana Eastern Standard Time(America/Indianapolis),PRT,Puerto Rico and US Virgin Islands Time(America/Caracas),CNT,Canada Newfoundland Time(America/St_Johns),AGT,Argentina Standard Time(America/Buenos_Aires),BET,Brazil Eastern Time(America/Sao_Paulo),CAT,Central African Time(Atlantic/Cape_Verde)";
var tzList = tzString.split(","
var previousTZ = "<%= ws.getCookie("TZ" %>"
//-->
</script>
</head>
<body bgcolor="#ffffff" topmargin="0" leftmargin="10" marginwidth="0" marginheight="0"
onLoad="document.forms[0].U.focus(); document.forms[0].U.select();">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
<!--jgxx
<tr CLASS=BannerLogo>
<td valign="center">
<a href=" src="images/erde.gif" width="42" height="40" border="0" alt="Infonova"></a></td>
<td width="*"> </td>
</tr>
-->
<tr class=Login>
<td colspan=4 width="30%"><font size="4px" color="#989898" face="arial,sans-serif"><u>Bitte melden Sie sich hier an:</u></font></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td height="35" colspan="3"> </td>
</tr>
</table>
</center>
<!-- login data entry - start -->
<center>
<table border="0" cellpadding="0" cellspacing="2" width="100%" bgcolor="#EBF5FD">
<form name="login" method=POST action="useserve.jsp">
<input type="hidden" name="O" value="1">
<input type="hidden" name="s">
<tr>
<td width="75"></td>
<td class=Login>Benutzer Name </td>
<td><input type="text" name="U" maxlength="20" value="" size="20"></td>
</tr>
<tr>
<td> </td>
<td class=Login>Passwort</td>
<td><input type="password" name="Pw" maxlength="30" size="20"></td>
</tr>
<tr>
<td width="75"></td>
<td class=Login>Server</td>
<td><select name="sList" size="5" multiple>
<script language="JavaScript1.2">
var dfltServer = "<%= ws.dfltserver() %>";
var foundServer = false;
var page = ""
// make sure the dlftServer is in the list of servers.
// if it isn't, then you will want to make the first server the selected server.
for(var i=0; i<serverList.length; i++){
if(dfltServer == serverList){
foundServer = true;
}
}
for(var i=0; i<serverList.length; i++){
page+="<option "
if((i==0) && ((dfltServer=="" || foundServer == false)){
page+= "selected ";
}else if(dfltServer == serverList){
page+= "selected ";
}
page += "value='"+serverList+"'>"+serverList
}
document.write(page)
</script>
</select> </td>
</tr>
<tr>
<td width="75"></td>
<td class=Login>Zeitzone</td>
<td><select name="TZ" size="1" onChange="tzSelected(this.form)">
<script language="JavaScript1.2">
var page = "";
for(var i=0; i<tzList.length; i+=2){
page+="<option "
if((i == 0) && (previousTZ == ""){
page+= "selected "
}
else if (previousTZ == tzList) {
page+= "selected "
}
page += "value='"+tzList+"'>"+tzList[i+1]
}
document.write(page)
</script>
</select> </td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td></td>
<td></td>
<td align="left"><input type="button" name="Act" value="Einloggen" onClick="parent.getDate('Login');parent.initGlobals();doLogin();"> <input
type="button" name="clear" value="Löschen" onClick="javascript:clearForm();"></td>
</tr>
<tr>
<td> </td>
<td colspan="2" align="center"> </td>
</tr>
</form>
</table>
</center>
<hr width="100%" height="20%" color="#ee9c00" align="left">
<!-- login data entry - end -->
</body>
<%@ include file="destroyws.jsp" %>
</html>
please can someone tell me how to delete the serverfield and the timezonefield in the following code, that the login will work, if i just hide the two fields it tells me on the login that i have to choose a server, is it possible to change only the this file or do i have to go deeper and change maybe the classes????
I want to learn jsp programming, and maybe if someone can tell me how to do this i will find my way easier.
Actually i tried some other things but all the time it tells me that he cannot find the server which he gets with an function directly from the Remedy Server itself.
thanks in forehand for help
<html>
<head>
<title>ARWeb 4.0</title>
<%@ include file="i18n.jsp" %>
<%@ include file="init.jsp" %>
<!--jgxx
<script language="JavaScript">
for(i=0; i < parent.frames.length; ++i)
alert(parent.frames.name);
</script>
-->
<script language="JavaScript1.2">
<!--
function clearForm() {
this.document.login.U.value="";
this.document.login.Pw.value="";
this.document.login.U.focus();
}
function tzSelected(f) {
var selectedTZ = f.TZ.options[f.TZ.selectedIndex].value;
var cookieDate = new Date();
cookieDate.setTime( cookieDate.getTime() + (1000 * 60 * 60 * 24 * 365) );
document.cookie = "TZ=" + selectedTZ + "; expires=" + cookieDate.toGMTString();
}
function doLogin()
{
if (document.login.U.value == ""
{
// retrieve message from arwebres.dll
alert('<%= WaserverUtil.encodeJSQuotedString(ws.OSLoadString(5310)) %>');
this.document.login.U.focus();
return;
}
var numServers = 0;
// pass the server list as a comma separated string
// rather than s=s1&s=s2
var csServers = ""; // comma separated servers
with (document.login.sList)
{
for ( var i = 0; i < length; i++ )
{
if (options.selected)
{
if ( options.text.length > 0 )
{
numServers++;
if (csServers.length != 0)
csServers += ",";
csServers += options.text;
}
}
}
}
if ( numServers == 0 )
{
// retrieve message from arwebres.dll
alert('<%= WaserverUtil.encodeJSQuotedString(ws.OSLoadString(5311)) %>');
this.document.login.sList.focus();
return;
}
// set the variable before doing submit
document.login.s.value = csServers;
document.login.submit();
}
var serverString = "<%= ws.dfltserverlist() %>";
var serverList = serverString.split(","
var tzString = "ARWeb Application Server Timezone,ARWeb Application Server Timezone,GMT,Greenwich Mean Time,ECT,European Central Time(Europe/Paris),EET,Eastern European Time(Europe/Istanbul),ART,Egypt Standard Time(Africa/Cairo),EAT,Eastern African Time(Asia/Riyadh),MET,Middle East Time(Asia/Tehran),NET,Near East Time(Asia/Yerevan),PLT,Pakistan Lahore Time(Asia/Karachi),IST,India Standard Time(Asia/Calcutta),BST,Bangladesh Standard Time(Asia/Dacca),VST,Vietnam Standard Time(Asia/Bangkok),CTT,China Taiwan Time(Asia/Shanghai),JST,Japan Standard Time(Asia/Tokyo),ACT,Australia Central Time(Australia/Darwin),AET,Australia Eastern Time(Australia/Sydney),SST,Solomon Standard Time(Pacific/Guadalcanal),NST,New Zealand Standard Time(Pacific/Fiji),MIT,Midway Islands Time(Pacific/Apia),HST,Hawaii Standard Time(Pacific/Honolulu),AST,Alaska Standard Time(America/Anchorage),PST,Pacific Standard Time(America/Los_Angeles),PNT,Phoenix Standard Time(America/Phoenix),MST,Mountain Standard Time(America/Denver),CST,Central Standard Time(America/Chicago),EST,Eastern Standard Time(America/New_York),IET,Indiana Eastern Standard Time(America/Indianapolis),PRT,Puerto Rico and US Virgin Islands Time(America/Caracas),CNT,Canada Newfoundland Time(America/St_Johns),AGT,Argentina Standard Time(America/Buenos_Aires),BET,Brazil Eastern Time(America/Sao_Paulo),CAT,Central African Time(Atlantic/Cape_Verde)";
var tzList = tzString.split(","
var previousTZ = "<%= ws.getCookie("TZ" %>"
//-->
</script>
</head>
<body bgcolor="#ffffff" topmargin="0" leftmargin="10" marginwidth="0" marginheight="0"
onLoad="document.forms[0].U.focus(); document.forms[0].U.select();">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
<!--jgxx
<tr CLASS=BannerLogo>
<td valign="center">
<a href=" src="images/erde.gif" width="42" height="40" border="0" alt="Infonova"></a></td>
<td width="*"> </td>
</tr>
-->
<tr class=Login>
<td colspan=4 width="30%"><font size="4px" color="#989898" face="arial,sans-serif"><u>Bitte melden Sie sich hier an:</u></font></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td height="35" colspan="3"> </td>
</tr>
</table>
</center>
<!-- login data entry - start -->
<center>
<table border="0" cellpadding="0" cellspacing="2" width="100%" bgcolor="#EBF5FD">
<form name="login" method=POST action="useserve.jsp">
<input type="hidden" name="O" value="1">
<input type="hidden" name="s">
<tr>
<td width="75"></td>
<td class=Login>Benutzer Name </td>
<td><input type="text" name="U" maxlength="20" value="" size="20"></td>
</tr>
<tr>
<td> </td>
<td class=Login>Passwort</td>
<td><input type="password" name="Pw" maxlength="30" size="20"></td>
</tr>
<tr>
<td width="75"></td>
<td class=Login>Server</td>
<td><select name="sList" size="5" multiple>
<script language="JavaScript1.2">
var dfltServer = "<%= ws.dfltserver() %>";
var foundServer = false;
var page = ""
// make sure the dlftServer is in the list of servers.
// if it isn't, then you will want to make the first server the selected server.
for(var i=0; i<serverList.length; i++){
if(dfltServer == serverList){
foundServer = true;
}
}
for(var i=0; i<serverList.length; i++){
page+="<option "
if((i==0) && ((dfltServer=="" || foundServer == false)){
page+= "selected ";
}else if(dfltServer == serverList){
page+= "selected ";
}
page += "value='"+serverList+"'>"+serverList
}
document.write(page)
</script>
</select> </td>
</tr>
<tr>
<td width="75"></td>
<td class=Login>Zeitzone</td>
<td><select name="TZ" size="1" onChange="tzSelected(this.form)">
<script language="JavaScript1.2">
var page = "";
for(var i=0; i<tzList.length; i+=2){
page+="<option "
if((i == 0) && (previousTZ == ""){
page+= "selected "
}
else if (previousTZ == tzList) {
page+= "selected "
}
page += "value='"+tzList+"'>"+tzList[i+1]
}
document.write(page)
</script>
</select> </td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td></td>
<td></td>
<td align="left"><input type="button" name="Act" value="Einloggen" onClick="parent.getDate('Login');parent.initGlobals();doLogin();"> <input
type="button" name="clear" value="Löschen" onClick="javascript:clearForm();"></td>
</tr>
<tr>
<td> </td>
<td colspan="2" align="center"> </td>
</tr>
</form>
</table>
</center>
<hr width="100%" height="20%" color="#ee9c00" align="left">
<!-- login data entry - end -->
</body>
<%@ include file="destroyws.jsp" %>
</html>