如何让递交表单后,打开的窗口固定大小

richard_ouyang 2002-05-28 10:35:52
如何让递交表单后,打开的窗口固定大小
因为是一个调查表单,希望进行处理的页面打开时能够固定大小
Width="300 " Height="400"
...全文
109 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
richard_ouyang 2002-05-29
  • 打赏
  • 举报
回复
<form name="form1">
<input type="text" name="abc">
<input type="button" name="Submit" value="送出" onClick="window.open('xxx.asp?abc=document.form1.abc.value','_self','toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=no')">
</form>
这样的方法我试了一下,但是abc无法获得值,我是在ASP中写的。
生成的HTML代码是
<form name=form1 method=Post action='Survey.asp?TypeId=46' onsubmit="window.open('Survey.asp?TypeId=46&answer=document.form1.answer.value','width=300,height=200')



richard_ouyang 2002-05-29
  • 打赏
  • 举报
回复
高定了,谢谢大家!
richard_ouyang 2002-05-29
  • 打赏
  • 举报
回复
Sub DisplaySurvey(TypeNum,Qnum,hrefPage )
dim qnumber,qvalue ,strTitle

strSql="Select * From Infotype Where TypePId="&TypeNum&" Order by TypeID Desc"
adoRst.Open StrSql,adoCon
If adoRst.Eof then
adoRst.Close
response.write "暂时没有调查问题!"
exit sub
End if
strTitle=adoRst("typeName")

Response.Write "<table Border='0' Cellspacing='0' Cellpanding='0'> <tr> <td>"
response.Write "<form name=form1 method=Post action='"& hrefpage &"?TypeId="&adorst("TypeID")&"' >"
'Response.Write "<input type=hidden name=typeId value='"&adorst("TypeId")&"'>"
Response.Write "<input type=hidden name=type value='do'>"
Response.Write "<tr><td><b>" & strTitle & "</td></tr>"
Qvalue=adorst("TypeID")
adorst.Close
strsql="select * from information where typeid="&Qvalue
adorst.open strsql,adocon
Do While Not adoRst.Eof
Response.Write "<tr><td><input type='radio' name='answer' value='"&adorst("InfoId")&"'>"&adorst("title")&"</td></tr>"
adoRst.movenext
Loop
Response.Write "<tr height=15><td></td></tr><tr><td><div align=center>"
response.write "<input class=mubutton type='button' value=' 提交 '"
response.write "onclick="&chr(34)&"window.open('"& hrefpage &"?TypeId="&qvalue&"','','width=300,height=400');document.form1.answer.submit();return false"&chr(34)&">"
response.write " <input type=button value='查看结果' class=mubutton onclick="&chr(34)&"window.open('survey.asp?typeID="&Qvalue&"','网站调查结果','Width=300 Height=400')"&chr(34)&"></div></td></tr>"
Response.Write "<tr><td height=20></td></tr></form></table>"
adorst.close
End Sub

'-------------------
' onsubmit="&chr(34)&"window.open('"& hrefpage &"?TypeId="&adorst("TypeID")&"&answer=document.form1.answer.value','','width=300,height=400');document.form1.answer.submit();return false"&chr(34)&"
'-------------------

'处理用户递交的网站调查表单
Sub DevSurvey()
Dim TotalCount,qcount
if Request.form("type")="do" then
if not request.Form ("answer")="" then
strSql="Update information set clickcount=Clickcount+1 Where InfoID="&Request.Form("answer")
adocon.execute strSql
else
response.Write "<div align='center'><b> 注 意 </b></div><br><br>  你没有选择任何项目进行投票,请先选择后再进行投票!这样才能看到调查的结果!"
exit sub
End IF
end If
strsql="select * from InfoType where TypeId="&Request.querystring("TypeID")
adorst.Open strSql,adocon
response.write("<table height='70%'><tr><td colspan=3><div align=center><b>"&adorst("TypeName")&"</div></td></tr>")
adorst.close
strSql="select * from Information where TypeID="&Request.querystring("TypeID")& " Order By ClickCount desc"
adorst.Open strSql,adocon
totalcount=0
qcount=0
do while Not adorst.eof
totalcount=totalcount+adorst("clickcount")
qcount=qcount+1
adorst.MoveNext
Loop
adorst.MoveFirst
do while not adorst.eof
Response.Write "<tr><td width='50%'>"&adorst("title")&":</td><td><div align='left'><hr size=5 color=#FF6666 width="&((adorst("clickcount")/totalcount)*200)&"></div></td><td>"&adorst("clickcount")&"</td></tr>"
adorst.MoveNext
loop
response.write "<tr><td colspan=3><hr color='#CCCCFF'><br>现在产生的总投票数为:"&totalcount&"票</td></tr></table>"

adorst.close
End Sub

怎么解决?
richard_ouyang 2002-05-29
  • 打赏
  • 举报
回复
document.forms[0].submit()
这样不行,我的数据递交不上去,要么就是打开2个窗口
怎么办?
yellowwee 2002-05-29
  • 打赏
  • 举报
回复
这样写:
action='admin/adminlogin.aspx' target='YellowWee'

<input type="button" onclick='sm()'>


function sm(){
window.open('','YellowWee','width=300,height=340,status=no,scrollbars=no,left=80,top=80')
document.forms[0].submit()
}
richard_ouyang 2002-05-29
  • 打赏
  • 举报
回复
现在我是想返回<select>的值,应该如何操作
qiushuiwuhen 2002-05-28
  • 打赏
  • 举报
回复
<body scroll=no
richard_ouyang 2002-05-28
  • 打赏
  • 举报
回复
成功了,但是如果我要让旁边的ScrollBar消失呢?
richard_ouyang 2002-05-28
  • 打赏
  • 举报
回复
我试了一下,不行,是不是区分大小写的
mmkk 2002-05-28
  • 打赏
  • 举报
回复
在接受数据页面
<body onload="this.resizeTo(300,400)">
qisanyou 2002-05-28
  • 打赏
  • 举报
回复
看看这篇贴,是不是对你有所帮助?

http://www.csdn.net/expert/topic/750/750562.xml?temp=3.606814E-02
richard_ouyang 2002-05-28
  • 打赏
  • 举报
回复
我只是想显示正文页面,同时不能修改窗口大小
richard_ouyang 2002-05-28
  • 打赏
  • 举报
回复
那么让页面的工具栏等等全部消失呢?

87,996

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧