
[flash][/flash]
上传是无组件上传
这个是主要代码,我想问的是:如何把iframe中上传后产生的新的文件名传值到
myfrom表单中给b,让b接受!我的目的是把b的值提交到数据库中!
<html><head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head>
<body><form action="iframetest2" name="myform" method=post>
<table border="1" width="19%" id="table1" height="253" cellspacing="0" cellpadding="0">
<tr>
<td height="185" align="left" valign="top">
<p align="center">
<iframe id="GuestList" height="177" width="100%" scrolling="no" marginheight="1" marginwidth="1"frameborder="0" src=upfile/upload.asp name="iframe1">
</iframe></td>
</tr>
<tr>
<td height="44">
<p align="center">
<input type="text" name="b" id="pic" size="23" ></td>
</tr>
<tr>
<td>
<p align="center"><input type="submit" value="提交" name="B1">
<input type="reset" value="重置" name="B2"></td>
</tr>
</table>
</form>
</body>
</html>
[此贴子已经被作者于2007-9-13 9:59:32编辑过]
<script language="javascript">
function aa(){
iframe1.document.form.b1.click();
}
</script>
<input type="submit" value="提交" name="b1" onclick="aa()">
提交这个时,同时模拟点击框架下<form>叫form的b1
如果你会cookie,可以用JS在提交时先把文字的部分写入cookie,那边收到图片后同时读出cookies(如果文字不是太长)
其实我觉得做人很低调的想法是很好的……
我也想用这个方法……
”
可以使用Iframe
把上传的FILE控件加到Iframe中
当上传图片后用SESSION或JS脚本把图片的保存路径返回
然后再将输入的信息和图片的路径一起保存到DATABASE中
“
就是这个红色部分这部太难实现了,不知道怎么设置session或者js!