注册 登录
编程论坛 ASP技术论坛

Dreamweaver 8里怎么实现 一个Form对应两个action 万分感谢!

wyl_ok 发布于 2008-09-23 09:38, 3107 次点击
以下是我的带有表单的部分程序,里面已经有了一个ACTION,我还要再加入一个action="proce.asp",请问怎么解决?万分感谢!

 <form ACTION="<%=MM_editAction%>" method="POST" name="form1" id="form1" onsubmit="MM_validateForm('USENAME','','R','lasttime','','R','title','','R','content','','R');return document.MM_returnValue">
  <table width="80%" class="tableBorder">
    <tr valign="baseline">
      <td height="22" colspan="5" align="left" valign="middle" nowrap="nowrap" class="column"><a href="huifu.asp? zhuti_id=<%=(zhuti.Fields.Item("zhuti_id").Value)%>">发表回复</a>
        <input name="zhuti_id" type="hidden" id="zhuti_id" value="<%=Request.QueryString("zhuti_id")%>" />
      <input name="reply" type="hidden" id="reply" value="<%=(zhuti.Fields.Item("reply").Value+1)%>" /></td>
    </tr>
    <tr valign="baseline">
      <td align="right" nowrap="nowrap">作者:</td>
      <td align="left"><input name="USENAME" type="text" id="USENAME" value="<%=Session("MM_Username")%>" readonly="true" /></td>
      <td align="right" nowrap="nowrap">发表时间</td>
      <td align="left"><input name="lasttime" type="text" id="lasttime" value="<%=NOW() %>" size="17" readonly="true" /></td>
      <td width="25%" rowspan="2" align="left"><img src="face/7-1.bmp" name="face_pre" border="0" id="face_pre" /></td>
    </tr>
    <tr valign="baseline">
      <td width="9%" align="right" nowrap="nowrap">主题:</td>
      <td width="36%" align="left"><input name="title" type="text" id="title" value="" size="32" />      </td>
      <td width="9%" align="right" nowrap="nowrap">头像:</td>
      <td width="21%" align="left"><select name="face" onchange="MM_swapImage('face','','document.lyfrm.face.value',1)">
        <%
While (NOT fabiao.EOF)
%><option value="<%=(fabiao.Fields.Item("face").Value)%>"><%=(fabiao.Fields.Item("face").Value)%></option>
        <%
  fabiao.MoveNext()
Wend
If (fabiao.CursorType > 0) Then
  fabiao.MoveFirst
Else
  fabiao.Requery
End If
%>
      </select>
      <img src="face/1.jpg" name="face" width="30" height="27" id="face" /></td>
    </tr>
    <tr valign="baseline">
      <td align="right" valign="top" nowrap="nowrap">内容:</td>
      <td colspan="4" align="left" valign="baseline"><textarea name="content" cols="60" rows="20"></textarea></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right"> 上传</td>
      <td colspan="4" align="left"><input type="file" name="mefile" /></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right">&nbsp;</td>
      <td colspan="4" align="left"><input name="submit" type="submit" onclick="MM_validateForm('USENAME','','R','content','','R');return document.MM_returnValue" value="发表主题" /></td>
    </tr>
  </table>
  <input type="hidden" name="MM_insert" value="form1" />
  <input type="hidden" name="MM_update" value="form1">
  <input type="hidden" name="MM_recordId" value="<%= zhuti.Fields.Item("zhuti_id").Value %>">
</form>
14 回复
#2
2008-09-23 09:51
把两个ASP文件整成一个ASP文件。
#3
wyl_ok2008-09-23 09:52
怎么把两个ASP文件整成一个ASP文件?能再说详细一点吗?谢谢
#4
2008-09-23 09:54
我也不太懂
#5
wyl_ok2008-09-23 10:42
没有人知道吗?急啊
#6
孤独冷雨2008-09-23 11:49
一个FORM加两个ACTION.你真是高手!
#7
wyl_ok2008-09-23 14:16
就没有别的解决办法了吗?
#8
yms1232008-09-23 15:57
一个form要想提交两次不能提交到同一个页面,而且这种功能Dreamweaver是无法自动生成的
<script language="javascript">
function form1_Submit()
{
   document.form1.target="_blank";//在新窗口提交
   document.form1.action="http://www.
   document.form1.submit();
   document.form1.action="http://www.
   document.form1.submit();
}
</script>
<form name="form1">
同时提交到新浪和网易
<input type="button" name="submit" onClick="form1_Submit();" value="提交">
</form>
#9
sunfishy2008-09-23 17:49
楼上正解.

<input type=button name=one onclick="this.form.action='proce.asp'">
#10
wyl_ok2008-09-26 14:44
谢谢版主!
#11
craft001wen2008-09-27 11:30
直接就可以提交两个表
<form name="form1" onSubmit="document.form2.submit()">
<input type="submit()" name="submit" value="提交">
</form>
<form name="form2" onSubmit="this.form">
....
</form>
#12
anlige2008-10-02 01:29
js动态修改action
#13
adsdomain2008-10-03 13:51
你可以参考一下http://www.个网站,他很有意思,同时提交到百度和google,你看看他是怎么做的
#14
wyl_ok2008-10-03 23:14
谢谢个位,受益匪浅!
#15
cslldu2008-10-10 08:31
好像实现不了吧
1