Hmm, okay, that was my bad. I assumed that
1*undefined would result in 0, but it gave me NaN. Well, you can change that line to something like:
JScript code:
hwnd_owner = hwnd_owner ? 1*hwnd_owner : 0;
which this time has been tested and I confirm that it works.
Just trying to make that parameter optional.
As already mentioned: don't make two identical features with just different names, that completely ruins the idea of grouping code in a function! Simply keep one BrowseForFile function, call it when necessary and do stuff with the result afterwards.