On approximately 4/12/2004 3:04 PM, came the following characters from the keyboard of POWELL, JAIME M. (JSC-IS) (IDI):
This is probably a silly question, but does the BrowseForFolder command work from a browser?
Well, it depends on what you mean by "work from a browser" :)
If your browser is written in perl, and calls BrowseForFolder, it would probably work by most everyone's definition of work.
However, if you are using some existing browser, passing commands to a web server, and executing this perl script below from that web server, then whan BrowseForFolder would attempt to do is pop up a window on the machine running the web server (it probably runs into Windows default security issues there, but those could be cured by adjusting permissions) to display a list of folders on the monitor of the machine running the web server, to allow selection of a folder on the web server via a mouse connected to the web server.
If the above fits into your definition of "work from a browser", then I'd recommend you look into the Windows security settings, to allow the Web service to interact with the monitor.... but I kind of doubt it does. Probably you want to look into generating appropriate HTML or Javascript code to trigger the browser to request a file or folder name from the user of the browser. But such seems like a topic for a different newsgroup.
I've been trying to get it to work and nothing happens. But if I run it from a command prompt, it works just fine. Here is the code that I'm using:
#!c:\Perl\bin\perl.exe
use Win32::FileOp qw(:_DIALOGS BrowseForFolder);
$|=1;
print "Content-type: text/html\n\n";
print <<HTML; <html> <head> <title>Archive a Project</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head>
<body bgcolor="#FFFFFF">
HTML
print "directory list coming";
$pathname = BrowseForFolder("Select a Directory:", &CSIDL_DESKTOP);
print "$pathname\n";
print <<HTML; </body></html> HTML
Any suggestions?
Thanks!!! Jaime _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
-- Glenn -- http://nevcal.com/ =========================== The best part about procrastination is that you are never bored, because you have all kinds of things that you should be doing.
_______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
