|
|
|
|
|
| | |
|
Active Server Pages ASP ASP.NET .aspx .ascx Web HTML Developer Internet Microsoft Web Services Visual Studio .NET CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Re: Refreshing a page |
From: |
S. MANJULA |
Date: |
5/3/2000 6:12:42 AM |
IP: |
203.197.163.2 |
Here is a sample ASP page I have used for dynamically changing the options of a field depending on the selection of another field on the same page. Hope it will help!
<html>
<head>
<title>Enter Demands</title>
</head>
<%
con1.open "DSN=SQLExp"
******
* functions fixselect, InitOptions, reInitOptions to dynamically change the
* contents of demanding officers drop down menu on Selecting the Division
* function GetProjName to get the ProjName & number on selecting FBE Ref
******
%>
<script language="javascript">
function fixSelect(val)
{
if (!pause)
{
document.write("<option>"+val);
} else {
var gr = document.FrontPage_Form1.txtDOfficer;
var valOption = new Option(val);
var valLen = gr.length;
gr.options[valLen] = valOption;
}
}
function InitOptions() {
<%
s1 = "select detail_code from category where group_code = WGROUP order by detail_code asc"
set r1 = con1.execute(s1)
if not r1.eof then
do while not r1.eof
st = r1("detail_code")
sels = sels & chr(10) & "<option>" & st
%> if (div1=="<%=st%>") {
<%
s2 = "select name, des from empmaster1 where division="
s2 = s2 & st & " and des like SC%% order by name"
set r2 = con1.execute(s2)
if not r2.eof then
do while not r2.eof
rt = r2("name") & ", " & r2("des")
%> fixSelect("ð/LM/W3SVC/3/Root |
Previous Message
|
|

|
|
|
|
|
|
|
|
|
|