
我在选择好图片后点击上传,如何能将iframe中的图片地址传递到主表单中1的位置,
这样我就可以把照片地址上传到数据库了……
主表单名称:myform iframe名称:myiframe








[此贴子已经被作者于2007-9-13 14:33:58编辑过]
[此贴子已经被作者于2007-9-13 14:33:58编辑过]
能不能把这个页面的源代码贴出来看看。
<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>
在upload.asp文件中上传后的操作里写如下javascript代码
<script language="javascript">
parent.document.myform.b.value="[上传后的路径]";
</script>