@Command([FileCloseWindow]) in web app with javascript

Hi all.

A web app contains a main form which has some hotspot buttons. I have a button called “Cancel”.

I tried smth in Client Formula: @Command([FileCloseWindow]); or @Command([CloseWindow]); but no succes on web.

In javascript I tried :

self.close();

window.close(); or, even, top.window.close(); but with no results for me.

I read this forum discussions but I couldn’t find a solution.

Thanks, Phaul

BTW: I put in my Edit button: location.search = “?EditDocument”; - to run on: WEB with Javascript.

After I close the form from the designer, and reopened it the Edit button had in its value - to run on: Client, with Formula: @Command[(EditDocument)]. Why?

PS: I think it depends on the type of browser you’re using: IE/ Mozilla/ Chrome … I wonder if there is a solution which work no matter what browser is in use.