File picker not working.

  •  05-05-2009, 11:39 AM

    File picker not working.

    This sample does not work in IE7
     
    I am trying to use this function to put a file path in a textbox. I have the following block of code.
     

    function callInsertImage(editorControl, textbox)

    {

    var editor1 = document.getElementById(editorControl);

    editor1.FocusDocument();

    var editdoc = editor1.GetDocument();

    editor1.ExecCommand('new');

    editor1.ExecCommand('insertdocument');

    InputURL(editorControl, textbox);

    }

     

    function InputURL(editorControl, textbox)

    {

    var editor1 = document.getElementById(editorControl);

    var editdoc = editor1.GetDocument();

    var links = editdoc.links;

    if(links.length>0)

    { document.getElementById(textbox).value = links[links.length-1].href;

    editor1.ExecCommand('new');

    document.getElementById(textbox).focus();

    }

    else

    {

    setTimeout(InputURL(editorControl, textbox),500);

    }

    }

View Complete Thread