shanker
08-31-2000, 10:17 AM
hi
this is bring it ur notice that does netscape support the following critirea
does it properly support html 4.0 and then does it support javascript totally
.this look like a kid question to all of u guys but i am facing this probelm
i add options in the list box
dynamically it doesnt get added this looks little funny
let me give u guys the code for what i am doing
below is the code
<%@ Language=VBScript %>
<%
'Response.Buffer=false
'If Session("UserID") = "" Then
' Response.Redirect "Home.asp?AspFormType=1"
'End if
%>
<html>
<head>
<title>Customer information Systems </title>
</head>
<script LANGUAGE="JavaScript">
<!--
function fn_alert()
{
fn_DisplaySub()
document.frmSearch.DisplaySub.selectedIndex =0;
}
function fn_DisplaySub()
{
var ftype=document.frmSearch.AspFormType.value ;
document.frmSearch.DisplaySub.disabled=false ;
switch (ftype)
{ case '1':
var list=new Array("Account Detail","Account List","Short Stock","Interested
Party","Profitability");
var lvalues=new Array("1","2","3","4");
break ;
case '3':
var list=new Array("Client Detail","Account List");
var lvalues=new Array("1","2");
break;
case '4':
var list=new Array("Stock Rates(A)","Stock Rates(B)","Option Rates");
var lvalues=new Array("1","2","3");
break
case '6':
var list=new Array("Profit Detail");
var lvalues=new Array("1");
break;
case '7':
var list=new Array("Account Names List","Client Names List");
var lvalues=new Array("1","2");
break;
case '8':
var list=new Array("Customer List");
var lvalues=new Array("1");
break;
case '9':
var list=new Array("Customer List");
var lvalues=new Array("1");
break;
case '10':
var list=new Array("Account Profile","Option Agreement","Margin Figuration","Position");
var lvalues=new Array("1","2","3","4");
break;
default:
var list=new Array(" "," ");
var lvalues=new Array("1","2");
document.frmSearch.DisplaySub.disabled=true;
}
//document.frmSearch.DisplaySub.options.length=0;
//suppose the select object has no values then
for(var i=0;i<list.length;i++)
{
document.frmSearch.DisplaySub.options[document.frmSearch.DisplaySub.length]=
new Option(list[i],lvalues[i]);
//document.frmSearch.DisplaySub.options[i].values=new option(list[i]);
// var llen=document.frmSearch.DisplaySub.options[i].length;
//document.frmSearch.DisplaySub.options[i].length = llen+1;
document.frmSearch.DisplaySub.options[i].text=list[i];
//document.frmSearch.DisplaySub.options[i].values=lvalues[i];
}
document.frmSearch.DisplaySub.selectedIndex=0;
}
//-->
</script>
<body width="500" BGCOLOR="#ffffff" LINK="#333399" VLINK="#333399" ALINK="#333399"
TOPMARGIN="0" LEFTMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0" onload="fn_alert()";>
<basefont FACE="Verdana,Helvetica,San Serif">
<table border="0" cellpadding="0" cellspacing="0" width="100">
<tr>
<td><img border="0" src="images/customer_topmenu_01.gif" WIDTH="640"
HEIGHT="87"></td>
</tr>
</table>
<%
Dim sMainMenu
sMainMenu = "<TABLE BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH='66%'>"
& _
"<TR>"&_
"<TD><A HREF='Home.asp'><FONT SIZE=2>Home</FONT></td>" & _
"<TD><A HREF='Search.asp'><FONT SIZE=2>Search</FONT></td>"
& _
"<TD><A HREF='Logout.asp'><FONT SIZE=2>Logout</FONT></td>"
& _
"</TABLE> "
Response.Write sMainMenu
sMainMenu = "<P><TABLE BORDER=0 CELLPADDING=1 CELLSPACING=1>" & _
"<TR>"&_
"<TD><FONT SIZE=4><STRONG>Search Customer Information Systems</FONT></td>"
& _
"<TR><TD>Enter your selection criteria to begin your search:</td>"
& _
"</TABLE> "
Response.Write sMainMenu
%>
<p></p>
<form ID="frmSearch" NAME="frmSearch" ACTION="Submit_Search.asp?" onSubmit="return
check_String()"; METHOD="POST">
<table BORDER="0" CELLPADDING="1" CELLSPACING="1" WIDTH="80%">
<tr>
<td><font size="2"><b>Look For:</b></font></td>
<td><input NAME="TxtSearch" STYLE="HEIGHT: 22px; WIDTH: 290px" MAXLENGTH="50"></td></tr>
<tr>
<td><font size="2"><b>Using:</b></font></td>
<td>
<select NAME="AspFormType" onchange="fn_DisplaySub()";>
<option selected value="1">Account Base
<option value="3">Client Id
<option value="4">Rates
<option value="6">Profit
<option value="7">Customer Name
<option value="8">Tax Id
<option value="9">Acronym
<option value="10">General
</select>
<tr>
<td><font size="2"><b>Display:</b></font></td>
<td><select name="DisplaySub">
</select>
</td>
<tr>
</table>
<br>
<input ID="btnSubmit" NAME="btnSubmit" TYPE="submit" VALUE="Submit">
<input ID="btnReset" NAME="btnReset" TYPE="reset" VALUE="Reset">
<br>
</form>
</basefont>
</body>
</html>
this is bring it ur notice that does netscape support the following critirea
does it properly support html 4.0 and then does it support javascript totally
.this look like a kid question to all of u guys but i am facing this probelm
i add options in the list box
dynamically it doesnt get added this looks little funny
let me give u guys the code for what i am doing
below is the code
<%@ Language=VBScript %>
<%
'Response.Buffer=false
'If Session("UserID") = "" Then
' Response.Redirect "Home.asp?AspFormType=1"
'End if
%>
<html>
<head>
<title>Customer information Systems </title>
</head>
<script LANGUAGE="JavaScript">
<!--
function fn_alert()
{
fn_DisplaySub()
document.frmSearch.DisplaySub.selectedIndex =0;
}
function fn_DisplaySub()
{
var ftype=document.frmSearch.AspFormType.value ;
document.frmSearch.DisplaySub.disabled=false ;
switch (ftype)
{ case '1':
var list=new Array("Account Detail","Account List","Short Stock","Interested
Party","Profitability");
var lvalues=new Array("1","2","3","4");
break ;
case '3':
var list=new Array("Client Detail","Account List");
var lvalues=new Array("1","2");
break;
case '4':
var list=new Array("Stock Rates(A)","Stock Rates(B)","Option Rates");
var lvalues=new Array("1","2","3");
break
case '6':
var list=new Array("Profit Detail");
var lvalues=new Array("1");
break;
case '7':
var list=new Array("Account Names List","Client Names List");
var lvalues=new Array("1","2");
break;
case '8':
var list=new Array("Customer List");
var lvalues=new Array("1");
break;
case '9':
var list=new Array("Customer List");
var lvalues=new Array("1");
break;
case '10':
var list=new Array("Account Profile","Option Agreement","Margin Figuration","Position");
var lvalues=new Array("1","2","3","4");
break;
default:
var list=new Array(" "," ");
var lvalues=new Array("1","2");
document.frmSearch.DisplaySub.disabled=true;
}
//document.frmSearch.DisplaySub.options.length=0;
//suppose the select object has no values then
for(var i=0;i<list.length;i++)
{
document.frmSearch.DisplaySub.options[document.frmSearch.DisplaySub.length]=
new Option(list[i],lvalues[i]);
//document.frmSearch.DisplaySub.options[i].values=new option(list[i]);
// var llen=document.frmSearch.DisplaySub.options[i].length;
//document.frmSearch.DisplaySub.options[i].length = llen+1;
document.frmSearch.DisplaySub.options[i].text=list[i];
//document.frmSearch.DisplaySub.options[i].values=lvalues[i];
}
document.frmSearch.DisplaySub.selectedIndex=0;
}
//-->
</script>
<body width="500" BGCOLOR="#ffffff" LINK="#333399" VLINK="#333399" ALINK="#333399"
TOPMARGIN="0" LEFTMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0" onload="fn_alert()";>
<basefont FACE="Verdana,Helvetica,San Serif">
<table border="0" cellpadding="0" cellspacing="0" width="100">
<tr>
<td><img border="0" src="images/customer_topmenu_01.gif" WIDTH="640"
HEIGHT="87"></td>
</tr>
</table>
<%
Dim sMainMenu
sMainMenu = "<TABLE BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH='66%'>"
& _
"<TR>"&_
"<TD><A HREF='Home.asp'><FONT SIZE=2>Home</FONT></td>" & _
"<TD><A HREF='Search.asp'><FONT SIZE=2>Search</FONT></td>"
& _
"<TD><A HREF='Logout.asp'><FONT SIZE=2>Logout</FONT></td>"
& _
"</TABLE> "
Response.Write sMainMenu
sMainMenu = "<P><TABLE BORDER=0 CELLPADDING=1 CELLSPACING=1>" & _
"<TR>"&_
"<TD><FONT SIZE=4><STRONG>Search Customer Information Systems</FONT></td>"
& _
"<TR><TD>Enter your selection criteria to begin your search:</td>"
& _
"</TABLE> "
Response.Write sMainMenu
%>
<p></p>
<form ID="frmSearch" NAME="frmSearch" ACTION="Submit_Search.asp?" onSubmit="return
check_String()"; METHOD="POST">
<table BORDER="0" CELLPADDING="1" CELLSPACING="1" WIDTH="80%">
<tr>
<td><font size="2"><b>Look For:</b></font></td>
<td><input NAME="TxtSearch" STYLE="HEIGHT: 22px; WIDTH: 290px" MAXLENGTH="50"></td></tr>
<tr>
<td><font size="2"><b>Using:</b></font></td>
<td>
<select NAME="AspFormType" onchange="fn_DisplaySub()";>
<option selected value="1">Account Base
<option value="3">Client Id
<option value="4">Rates
<option value="6">Profit
<option value="7">Customer Name
<option value="8">Tax Id
<option value="9">Acronym
<option value="10">General
</select>
<tr>
<td><font size="2"><b>Display:</b></font></td>
<td><select name="DisplaySub">
</select>
</td>
<tr>
</table>
<br>
<input ID="btnSubmit" NAME="btnSubmit" TYPE="submit" VALUE="Submit">
<input ID="btnReset" NAME="btnReset" TYPE="reset" VALUE="Reset">
<br>
</form>
</basefont>
</body>
</html>