Help, From question.....
Original page
<%
IF session("administrator_name") = "" THEN
response.redirect "../login/adlogin.asp"
response.end
END IF
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><LINK
href="style.css" type=text/css rel=stylesheet>
<title></title>
</head>
<body background=../image/bg.gif>
<p align="center"></p>
<table background="#ffffff" align="center" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="800" id="AutoNumber1" height="400">
<tr>
<td width="100" height="441" VALIGN="TOP">
<align="left">
service management<BR>
<a href="client_order.asp">order management</a><BR>
N user management<BR>
user management<BR>
artical management<BR>
<a href="main_type_add.asp">main type add</a><BR>
<a href="main_type_list.asp">main type edit</a><BR>
<a href="artical_type_add.asp">artical type add</a><BR>
<a href="artical_type_list.asp">artical type edit</a><BR>
<a href="artical_add.asp">artical add</a><BR>
<a href="artical_type.asp">edit aritcal</a><br>
<a href="admin_user_manage.asp">system management</a><br>
<a href="admin_user_add.asp">add user</a><br>
<a href="admin_user_list.asp">user management</a>
</td>
</td>
<td valign=top width="713" height="441">
<p align="left">artical add</p>
<FORM action = "artical_add1.asp" method="POST">
<table border=0 height="395" align="left">
<tr>
<td align=right height="19">main type:</td>
<td><select name="main_type">
<%
set conn = DBConn()
on error resume next
sql="SELECT * from main_type order by main_type_id"
set rs=server.createobject("adodb.recordset")
Set rs=conn.Execute(sql)
do while not rs.eof
Response.Write "<option>"&rs("main_type_name")
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing
%>
</option>
</select>
</td>
</tr>
<tr>
<td align=right height="19">artical type:</td>
<td><select name="artical_type">
<%
set mconn = DBConn()
on error resume next
msql="SELECT * from artical_type order by artical_type_id"
set mrs=server.createobject("adodb.recordset")
Set mrs=mconn.Execute(msql)
do while not mrs.eof
Response.Write "<option>"&mrs("artical_type_name")
mrs.MoveNext
Loop
mrs.Close
Set mrs = Nothing
mconn.Close
Set mconn = Nothing
%>
</option>
</select></td>
</tr>
<tr>
<td align=right height="19">artical titel</td>
<td height="19"><input type="text" NAME="artical_title" size="70"></td>
</tr>
<tr><td valign=top align=right height="345">artical:</td>
<td height="345"><textarea warp=soft name="artical" rows=26 cols=69></textarea></td>
</tr>
<input type="SUBMIT" value="add">  <input type="reset" value="reset">
</td>
</tr>
</table>
</FORM>
</td>
</tr>
</table>
</body>
</html>
auto select menu test pass
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
above insert <head></head>
<select name="first" onChange="MM_jumpMenu('parent',this,0)">
<%
sql="select main_type_id,main_type_name from main_type order by main_type_id"
set rs = DBconn.execute(sql)
if rs.eof or rs.bof then
response.write "<option>-----</option>"
else
while not(rs.eof or rs.bof)
response.write "<option value='?sec="&rs("main_type_id")&"'"
if cstr(rs("main_type_id")) = request.querystring("sec") then
response.write "selected"
end if
response.write (">" & rs("main_type_name") & "</option>")
rs.movenext
wend
rs.movefirst
end if
%>
</select>
<select name="second">
<%if rs.eof or rs.bof then
response.write ("<option>--------</option>")
else
if request.querystring("sec") = "" then
temp = rs("main_type_id")
else
temp = request.querystring("sec")
end if
subsql = "select * from artical_type where main_type_name='"&temp&"'"
set subrs = DBconn.execute(subsql)
if subrs.eof or subrs.bof then
response.write ("<option>-----</option>")
else
while not(subrs.eof or subrs.bof)
response.write "<option value='" & subrs("artical_type_name") & "'>"&subrs("artical_type_name")&"</option>"
subrs.movenext
wend
end if
end if
subrs.close
set subrs = nothing
rs.close
set rs = nothing
conn.close
set conn = nothing
%>
</select>
It's doesn't display well when I use red word replace green word.. please help me, thank million!!!
|