Re: File picker not working.

  •  05-05-2009, 1:26 PM

    Re: File picker not working.

    still not working. i put this code in. adn i get a stack overflow error. if i take the parameters out of the setTimeout line. the pop doesnt stay open.

    function callInsertImage(editorControl, textbox)

    {

    var editor1 = document.getElementById(editorControl);

    editor1.FocusDocument();

    var editdoc = editor1.GetDocument();

    editor1.ExecCommand('new');

    editor1.ExecCommand('insertdocument');

    InputURL(editorControl, textbox);

    document.getElementById(textbox).focus();

    }

     

    function InputURL(editorControl, textbox)

    {

    var editor1 = document.getElementById(editorControl);

    var editdoc = editor1.GetDocument();

    var links = editdoc.getElementsByTagName("a");

    if(links.length>0&&links[links.length-1].href!="")

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

    }

    else

    {

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

    }

    }

View Complete Thread