RT
在Form中嵌入Iframe做无刷新上传,我想把上传路径传给父窗口中一个<input type="hidden" id=PhotoUrl name="PhotoUrl">, 但是在父窗口中window.frames["iframe_id"]之后的属性中没有document属性。。有没童鞋遇见过这样的问题,求指点。

解决方案 »

  1.   

    iframe 无刷新上传
      

  2.   

    是啊,在Iframe中的<input type="file" id="fileup"> 上传之后我想保存一下图片的路径在<input type="hidden" id="PhUrl" name="PhUrl">这个成功了,
    我在Form中做了一个表单验证有一个<input type="hidden" id="PhotoUrl" name="PhotoUrl">
    将Iframe中的PhUrl.value传给Form中PhotoUrl。
    在Form的aspx  <script type="text/javascript"> window.frames["iframe_id"]找不到document属性,因而无法获得iframe.getElementById("PhUrl").value。
     就是这个情况,有没大虾告诉我这个问题的产生及处理办法?
      

  3.   

    document.getElementById("iframe_id")提示跟window.frames["iframe_id"]一样,未找到对象或对象为空。
      

  4.   

    window.frames["iframe_id"]用Iframe的name不要用ID
      

  5.   

    to kongxiangli:
    这个法子依然不行。