| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1125 人关注过本帖
标题:[求助]input搜索代码哪里错误
只看楼主 加入收藏
gerun
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2007-7-6
收藏
 问题点数:0 回复次数:5 
[求助]input搜索代码哪里错误

代码是个网站的首页,里面有个在线调查,错误出现在点击房源搜索后出现的调查的结果,不能出现搜索内容

演示:www.sjzgerun.com
我的QQ:116574488


<!--#include file=init.asp-->
<%
mymenu="default"
myurl="default.asp"
myname="首页"
%>
<%
voteid=Request.Form("radiobutton")
if voteid="" or not isnumeric(voteid) then
else
if Request.ServerVariables("Request_Method")="POST" then
sqltext3="select * from vote where id=1"
rs.open sqltext3,cn,1,2
if not rs.eof then
rs("count")=rs("count")+1
rs("editdate")=now()
rs.update
end if
rs.close
sqltext3="select * from vote where id="&voteid
rs.open sqltext3,cn,1,2
if not rs.eof then
rs("count")=rs("count")+1
rs("editdate")=now()
rs.update
end if
rs.close

Response.Redirect myurl&"?voteok=1&m=2#vote"
end if
end if
%>
<!--#include file="begin.asp"-->
<table width="1002" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="190" align="center" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="48"><img src="images/point_title_1.jpg" width="48" height="33"></td>
<td valign="bottom" background="images/bg_title_1.jpg"><img src="images/picture_title_1.jpg" width="55" height="22"></td>
<td align="right" valign="bottom" background="images/bg_title_1.jpg"><a href="about.asp"><img src="images/bt_more.jpg" width="26" height="12" border="0"></a></td>
<td width="23"><img src="images/point_title_4.jpg" width="23" height="33"></td>
</tr>
</table>
<%
sql="select * from news where id=4 and cnflag=1"
rs.open sql,cn,1,1
if not rs.eof then
rscontent=rs("content")
rspicflag=rs("picflag")
end if
rs.close
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="5"></td>
</tr>
</table>
<%if rspicflag=1 then%>
<table width="90%" align=center border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" height="60" align=center><a href="about.asp"><img src="myasp_pic_display.asp?keyno=4&code=&tablename=news" width="81" height="52" border="0" style="border:1px solid #EBE2E0;"></a></td>
</tr>
</table>
<table width="85%" align=center border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="60" align="left"><%=cutstr(rscontent,50,0)%></td>
</tr>
</table>
<%end if%>
<a name="vote">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="48"><img src="images/point_title_2.jpg" width="48" height="33"></td>
<td valign="bottom" background="images/bg_title_1.jpg"><img src="images/picture_title_2.jpg" width="55" height="22"></td>
<td align="right" valign="bottom" background="images/bg_title_1.jpg"><!--a href="#"><img src="images/bt_more.jpg" width="26" height="12" border="0"></a--></td>
<td width="23"><img src="images/point_title_4.jpg" width="23" height="33"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<table width="180" border="0" cellspacing="0" cellpadding="0">
<form name="form_vote" method="post" action="<%=myurl%>#vote">
<%
sqltext="select * from vote where cid=0 and id=1"
rs.open sqltext,cn,1,1
if not rs.eof then
rstitle=rs("title")
end if
rs.close
%>
<tr>
<td height="10" colspan="2"> </td>
</tr>
<tr>
<td colspan="2">·<%=rstitle%></td>
</tr>
<tr>
<td height="5" colspan="2"> </td>
</tr>
<tr>
<td height="1" colspan="2" background="images/line_point1.gif">
</td>
</tr>
<%
rstitle=""
sqltext="select * from vote where cid=1 and cnflag=1 and id<>1 order by xuhao"
rs.open sqltext,cn,1,1
checked=" checked"
do while not rs.eof
%>
<tr>
<td width="25"><input type="radio" name="radiobutton" value="<%=rs("id")%>"<%=checked%>></td>
<td width="155" height="20"><%=rs("title")%></td>
</tr>
<tr>
<td height="1" colspan="2" background="images/line_point1.gif">
</td>
</tr>
<%
checked=""
rs.movenext
loop
rs.close
%>
<tr>
<td height="10" colspan="2">
<table width="180" border="0" cellspacing="0" cellpadding="0">
<tr align="center">
<td height="25" width=80 align=center><input type="image" src="images/bt_new1.gif" width="58" height="14"></td>
<td width=10></td>
<td width=90 align=left><a href="#" onClick="window.open('popwin_vote.asp','','width=500,height=253,scrollbars=no,left=300,top=200'); return false;"><img src="images/bt_new2.gif" width="58" height="14" border="0"></a></td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="48"><img src="images/point_title_3.jpg" width="48" height="33"></td>
<td valign="bottom" background="images/bg_title_1.jpg"><img src="images/picture_title_3.jpg" width="55" height="22"></td>
<td align="right" valign="bottom" background="images/bg_title_1.jpg"><a href="about.asp?keyno=7"><img src="images/bt_more.jpg" width="26" height="12" border="0"></a></td>
<td width="23"><img src="images/point_title_4.jpg" width="23" height="33"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<script language="JavaScript">
<!--
var bToggle=1;
function fnToggle()
{
var oImg=document.getElementById("oImg");
oImg.filters[0].Apply();
oImg.src="images/default/"+bToggle+".jpg";
oImg.filters[0].play();
bToggle=bToggle+1;
if(bToggle>6) {bToggle=1}
}
var oImg_Transition=0
var thetimer
function dotimer()
{
oImg_Transition=oImg_Transition+1;
document.getElementById("oImg").style.filter="RevealTrans(duration=2,Transition="+oImg_Transition+")"
if ( oImg_Transition>23 ) { oImg_Transition=0 }
fnToggle();
thetimer=setTimeout("dotimer();",3000);
}
//-->
</script>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10"></td>
</tr>
</table>
</td>
<td width="1" bgcolor="EAEAEA"></td>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="55%" align="center" valign="top"><table width="96%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="69" align="center" valign="bottom" bgcolor="FF0000"><a href="search.asp" class="link1"><font color="#FFFFFF">出售房查询</font></a></td>
<td width="7"><img src="images/point_title_5.gif" width="6" height="16"></td>
<td width="60" align="center" valign="bottom" bgcolor="FF0000" class="a02"><a href="search.asp" class="a02">新房查询</a></td>
<td width="7"><img src="images/point_title_5.gif" width="6" height="16"></td>
<td width="60" align="center" bgcolor="FF0000"><a href="search.asp" class="a02">出租查询</a></td>
<td width="6"><img src="images/point_title_5.gif" width="6" height="16"></td>
<td><img src="images/show_3.jpg" width="7" height="16"></td>
</tr>
</table>
<table width="96%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="1"></td>
</tr>
</table>
<table width="96%" border="0" cellpadding="0" cellspacing="0" style="border:1px solid #FF0000;">
<tr>
<td width="80" align="center" bgcolor="#FFFFFF"><table width="90%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><a href="search.asp"><img src="images/icon_1.jpg" width="62" height="62" border="0"></a></td>
</tr>
<tr>
<td align="center"><a href="search.asp" class="a01">高级搜索</a></td>
</tr>
</table></td>
<td valign="top" bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<form name=seekform1 action=search_result.asp method=post autocomplete = "off">
<tr>
<td width="23%" height="38"><span class="font3"><font color="FF0000">关键字查询</font></span><font color="FF0000">:</font></td>
<td width="49%">
<input name="location" type="text" class="input1" size="25"> </td>
<td><input type="image" src="images/bt_1.jpg" width="58" height="16" border="0"></a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="18%" height="23">所在区域:</td>
<td width="32%">
<select name="terrcode" style="width:95px;">
<option value=''>---不限---
<%citycode="101"%>
<option value='<%=citycode%>')>石家庄市</option>
<%
sql="select classcode,classname from pub_terrain where parentcode='"+citycode+"' order by sortnum"
rs.Open sql,cn,1,1
do while not rs.EOF
%>
<option value='<%=rs(0)%>')>--<%=trim(rs(1))%></option>
<%
rs.MoveNext
loop
rs.Close
%></select> </td>
<td width="18%">房屋用途:</td>
<td>
<select name="purpose" style="width:95px;">
<option value=''>---不限---
<%sqltext="select classcode,classname from pub_purpose order by sortnum"
rs.Open sqltext,cn,1,1
do while not rs.EOF
%>
<option value='<%=rs(0)%>')><%=trim(rs(1))%></option>
<%
rs.MoveNext()
loop
rs.Close()
%></select></td>
</tr>
<tr>
<td height="23">房屋类型:</td>
<td>
<select name="housetype" style="width:95px;">
<option value=''>---不限---
<%sqltext="select classcode,classname from pub_type order by sortnum"
rs.Open sqltext,cn,1,1
do while not rs.EOF
%>
<option value='<%=rs(0)%>')><%=trim(rs(1))%></option>
<%
rs.MoveNext()
loop
rs.Close()
%></select></td>
<td>房屋楼层:</td>
<td>
<select name="floor" style="width:95px;">
<option value=''>---不限---
<option value=0>地下室
<option value=1> 一层
<option value=2> 二层
<option value=3> 三层
<option value=4> 四层
<option value=5> 五层
<option value=6> 六层
<option value=7> 七层
<option value=8> 七层以上
</select></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table></td>
</tr>
</table>
<table width="96%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10"></td>
</tr>
</table> </td>
</tr>
</table>
</td>
</tr>
</table>
<script language=javascript>
dotimer();
<%
voteok=Request.QueryString("voteok")
if voteok="1" then
Response.Write("window.open('popwin_vote.asp','','width=500,height=253,scrollbars=no,left=300,top=200')")
end if
%>


搜索更多相关主题的帖子: input 搜索 代码 voteid 
2007-07-06 22:14
gerun
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2007-7-6
收藏
得分:0 
回复:(gerun)[求助]input搜索代码哪里错误
2007-07-07 20:10
zhufng
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2007-7-8
收藏
得分:0 

好长啊


积累生活的点滴,增长人生阅历........
2007-07-08 20:10
gerun
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2007-7-6
收藏
得分:0 
<table width="96%" border="0" cellpadding="0" cellspacing="0" style="border:1px solid #FF0000;">
<tr>
<td width="80" align="center" bgcolor="#FFFFFF"><table width="90%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><a href="search.asp"><img src="images/icon_1.jpg" width="62" height="62" border="0"></a></td>
</tr>
<tr>
<td align="center"><a href="search.asp" class="a01">高级搜索</a></td>
</tr>
</table></td>
<td valign="top" bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<form name=seekform1 action=search_result.asp method=post autocomplete = "off">
<tr>
<td width="23%" height="38"><span class="font3"><font color="FF0000">关键字查询</font></span><font color="FF0000">:</font></td>
<td width="49%">
<input name="location" type="text" class="input1" size="25">
</td>
<td><input type="image" src="images/bt_1.jpg" width="58" height="16" border="0"></a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="18%" height="23">所在区域:</td>
<td width="32%">
<select name="terrcode" style="width:95px;">
<option value=''>---不限---
<%citycode="101"%>
<option value='<%=citycode%>')>石家庄市</option>
<%
sql="select classcode,classname from pub_terrain where parentcode='"+citycode+"' order by sortnum"
rs.Open sql,cn,1,1
do while not rs.EOF
%>
<option value='<%=rs(0)%>')>--<%=trim(rs(1))%></option>
<%
rs.MoveNext
loop
rs.Close
%></select> </td>
<td width="18%">房屋用途:</td>
<td>
<select name="purpose" style="width:95px;">
<option value=''>---不限---
<%sqltext="select classcode,classname from pub_purpose order by sortnum"
rs.Open sqltext,cn,1,1
do while not rs.EOF
%>
<option value='<%=rs(0)%>')><%=trim(rs(1))%></option>
<%
rs.MoveNext()
loop
rs.Close()
%></select></td>
</tr>
<tr>
<td height="23">房屋类型:</td>
<td>
<select name="housetype" style="width:95px;">
<option value=''>---不限---
<%sqltext="select classcode,classname from pub_type order by sortnum"
rs.Open sqltext,cn,1,1
do while not rs.EOF
%>
<option value='<%=rs(0)%>')><%=trim(rs(1))%></option>
<%
rs.MoveNext()
loop
rs.Close()
%></select></td>
<td>房屋楼层:</td>
<td>
<select name="floor" style="width:95px;">
<option value=''>---不限---
<option value=0>地下室
<option value=1> 一层
<option value=2> 二层
<option value=3> 三层
<option value=4> 四层
<option value=5> 五层
<option value=6> 六层
<option value=7> 七层
<option value=8> 七层以上
</select></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table></td>
</tr>
</table>
2007-08-25 10:44
gerun
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2007-7-6
收藏
得分:0 
看看这个搜索框有什么问题
2007-08-25 10:45
天涯听雨
Rank: 2
来 自:东莞
等 级:论坛游民
威 望:4
帖 子:497
专家分:64
注 册:2007-8-25
收藏
得分:0 

请不要提问时就把代码全部给帖出来,是要回答者帮你找出错误在哪,然后在回答。

回答哪有时间进行你看你那么多代码。。你就直接点,,你想要什么功能,而你怎么做,却没有达到效果,问题出在哪。

这样我们在回答时才能进行引导式进行回答。。


不过这里提示一下

一般做搜索,也无外乎进行把相关关键字提交给查询进行查询

提交查询有两种方式,一种post 一种是get 要明白这两种有什么区别

post 方式进行提交时,相关参数会在表单里进行提交,而get,是会把相关参数提交到地址表里,

在接收请注意接收方式


从明天起做幸福的人,喂马劈柴周游世界!
2007-08-25 13:11
快速回复:[求助]input搜索代码哪里错误
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.031240 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved