Sub selectTopic()
dim id,topicArray,topicId,dbtypename
id = getForm("id","get"):topicId=getForm("topicid","get"):dbtypename=getForm("dbtypename","get")
topicArray = conn.db("select m_id,m_name from {pre}"&dbtypename&"topic order by m_id asc","array")
echo makeTopicSelect("topicselect",topicArray,"...请选择专题...",topicId)
echo "<input type=""button"" value=""确定"" onclick='submitVideoTopic("&id&",'"&dbtypename&"')' /> <input type=""button"" value=""取消"" onclick='closeWin()' />"
End Subfunction submitVideoTopic(videoId,dbtypename){
var topic = $("topicselect").value
if (topic.length==0) {
alert('请选择专题')
return false
}
ajax.get(
"admin_ajax.asp?id="+videoId+"&topic="+topic+"&dbtypename="+dbtypename+"&action=submittopic", 
function(obj) {
if(obj.responseText == "submitok"){
set($("topic"+videoId),"<font color='red'>"+$("topicselect").options[$("topicselect").selectedIndex].text+"</font>");
closeWin();
}else{
set($("topic"+videoId),"<font color='red'>发生错误</font>");
}
}
);
}