Question
· May 30, 2019

Call windows explorer from a Zen page

I need to open a Windows explorer window by pressing button on a Zen page.

Is this possible.?  I

performed a search but I did not find anything.

The command I used in the terminal was  D $zf(-2,"START C:\WINDOWS\SYSTEM32").

I am not sure how to use this in a Zen application.

Any help will be greatly  appreciated.

Discussion (8)0
Log in or sign up to continue

Hi Lamont,

I do use the following in one of my applications:

ClientMethod Webbutton() [ Language = javascript ]
{
var table this.getComponentById('relationTable');
        var index table.getProperty('selectedIndex');
        if (index 0) {
                alert('No row is selected in the table.');
                return;
        }
        var data table.getRowData(index);
        if (data == null) {
                alert('Table is not in snapshot mode or invalid request.');
        }
        else {

                   var person=data.Website
                   var tpref "http://"
                   
                   
                   
                   alert (person)
                   ///alert (tWeb)
                   var url "http://www.google.com/"
                   
                   var url "http://" person;
                    window.open(url);
                  /// window.open(person);

}
}

It opens a URL from  a record selected in a TablePane. I think it opens the default browser (in my case Firefox).

Maybe this example helps you. (yes, the name of the variable [person] looks odd.)

For myself it works great

Do you want server side explorer?

If so please have a look at this

/// Demonstration of launching a file selector window. 
ClientMethod showFileSelectionWindow() [ Language = javascript ]
{
zenLaunchPopupWindow('%ZEN.Dialog.fileSelect.cls','FileSelection','status,scrollbars,resizable,width=500,height=700');
}

/// This client event, if present, is fired when the a popup page
/// launched from this page fires an action.
ClientMethod onPopupAction(popupNameactionvalue) [ Language = javascript ]
{
switch(popupName) {
case 'FileSelection':
if (action=='ok');{
alert('My File is:'value);
///Do something...
}
break;
}
}