Argjent
Argjent

Reputation: 97

ActiveX - JavaScript popup goes behind main window

I have a popup that is made with JavaScript, but the popup always goes behind the IE window - how can I make it show up always on front and to be focused?

This is my JavaScript code:

 function FindFilePath() {
        var sRet;
        var IE = new ActiveXObject("InternetExplorer.Application");
        IE.visible = false;
        IE.Navigate("about:blank");
        while (IE.busy) { }
        IE.document.focus();
        IE.document.write('<HTML><BODY><INPUT ID="Fil" Type="file"></BODY></HTML>');
        //IE.document.all.Fil.focus();
        IE.document.all.Fil.click();

        var sRet = IE.document.all.Fil.value;
        IE.quit();
        IE = null;
        document.getElementById("<%=TextBox1.ClientID %>").value = sRet; }

Upvotes: 0

Views: 309

Answers (0)

Related Questions