我自己弄了个别人在线编译文本,因为本来的没有图片上传功能,所以我把1.6.3的上传图片的FTB.IMAGEGALLERY.ASPX弄了过来,可是弄过来了,图片可以上传,可是点际图片的时候没有反应,正常的话应该可以自己插到编辑区域的啊;
调用FTB.IMAGEGALLERY.ASPX页的代码:url = showModalDialog("comm/uploadimage.htm","window","dialogWidth:640pt;dialogHeight:500pt;status:0");
这里的URL要是为这样的形式的话http://www.hao123.com/masjf.gif
或别的什么AFA.GIF的时候都是正常的.
我的问题就是怎么showModalDialog("comm/ftb.imagegallery.aspx","window","dialogWidth:640pt;dialogHeight:500pt;status:0");没有返回值????

解决方案 »

  1.   

    showModalDialog打開的文檔對象中要調用 
    window.returnValue來設置返回值
      

  2.   

    showModalDialog打開的文檔對象中要調用 ???
    怎么调用?不是直接window.returnValue=xxx;
    然后xxx的值就传给了主窗口的showModalDialog()了吗?
      

  3.   

    showmodaldialog的窗口有个属性是returnvalue,这个值是返回值。要在你showdialog的页面中加这个东东。
      

  4.   

    <script language="javascript">
    function ReturnValue()
    {
    var parwin = window.dialogArguments;
        
         parwin.document.all.txtPersonName.value=document.all.txtValue.value;
    parwin.document.all.txtPersonNo.value=document.all.txtUser.value;
    window.close();


    }
    </script>
      

  5.   

    to:
    codeangel(-- 与人方便,自已方便 --) 
    还不不明白,returnvalue()不用自己定义的吧.我看资料不是showmodaldialog("你的地址","你要传的值","子窗口属性")
    然后在子窗口中用 window.returnValues=xxx;返回值xxx给showmodaldialog("你的地址","你要传的值","子窗口属性")?
      

  6.   

    我KAO,贴沉了,自己顶下,解决了马上给分
    要是在沉的话,在顶,开马甲也要顶到解决为止
      

  7.   

    ftb.imagegallery.aspx里有句话:
    myImageHolder.Attributes["ondblclick"]="returnImage('" + ImageFileLocation.Replace("\\","/") + "','" + myImage.Width.ToString() + "','" + myImage.Height.ToString() + "');";  他的作用是双击事件发生的时候,触发 returnImage(imagename,width,height)  事件来返回值的,返回的时候返回的数组(保存图片名/宽/高)如下:<SCRIPT LANGUAGE="JavaScript">
    <!--
    function returnImage(imagename,width,height) {
    var arr = new Array();
    arr["filename"] = imagename;  
    arr["width"] = width;  
    arr["height"] = height;  
    window.parent.returnValue = arr;
    window.parent.close();
    }
    //-->
    </SCRIPT>返回到页面后取得返回的数组,插入图片OK
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function InsertPic()
    {
    if (!validateMode())
    {
    return;
    }

    HtmlEdit.focus();
    var range = HtmlEdit.document.selection.createRange();
    var arr = showModalDialog("InsertPic.aspx?<%=Request.QueryString%>", window,"dialogWidth:300px; dialogHeight:200px;help:0;status:0;resizeable:1");  
    if (arr != null)
    {
    var imagestring = "<img src='uploads/"+ arr['filename'] + "' width='"+arr['width']+"' height='"+arr['height']+"'>";
    range.pasteHTML(imagestring);
    }
    else HtmlEdit.focus();
    }
    //-->
    </SCRIPT>
      

  8.   

    楼上的,这一句是用来取得返回值是吧
    var arr = showModalDialog("InsertPic.aspx?<%=Request.QueryString%>", window,"dialogWidth:300px; dialogHeight:200px;help:0;status:0;resizeable:1");
    返回InsertPic.aspx这个页面的值?这个不懂是什么意思,可以解释下吗? InsertPic.aspx?<%=Request.QueryString%>  
      

  9.   

    InsertPic.aspx?<%=Request.QueryString%>  
    -------------------
    是获得Request.QueryString传递过来的参数.
    如:页面:aaa.aspx?id=1&id2=3
    这样一来Request.QueryString = "id=1&id2=2";