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>");
}
}
);
}
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>");
}
}
);
}
解决方案 »
- ext怎么显示数据库datetime日期呢?
- if语句效率和语法问题的思考求助
- 一段JS代码不知道为什么执行不了,大家帮忙看看啊
- js 非空验证 text
- 请教大师们,js拼接字符串的问题
- 火狐用jQuery magnify 放大镜 没有问题,ie7打开本地html也没问题,通过web访问就不能显示大图?
- 如何跨站获取浏览页(目标站)的URL
- 大于零的数字,且一定要有一位小数,这样的正则表达式如何写?
- 关于DHTML Editing control Object的一个问题(在线等待)
- 怎么实现淘宝上点击不同的套餐 局部刷新价格的效果 大神给个思路
- 为img绑定onload事件问题
- js返回值,救命~~~
改成
onclick=""submitVideoTopic(" & id & ",'" & dbtypename & "')""