Why push button twice on web

Hi,I use the following formula in a button to open a new document on the web. Unfortunattly I have to push the button twice to open it. Any ideas why?

@SetTargetFrame(“_blank”);

@Command([FileSave]);

@Command([Compose];“”:“”;“PrintWebStart”)

Thanks

Oliver

Subject: RE: Why push button twice on web

I suspect it’s because your server is slow and you are impatient.

Subject: RE: Why push button twice on web

:-))OK, that’s one posibility. But unlikly.

Because when I push the button the first time, it looks like the frame refreshes it self. I donÄ’t know if it has something to do with the save?

Rgds

Oliver

Subject: RE: Why push button twice on web

Have you got a query save agent on your form? - do you need your ‘save’ in there?

Subject: RE: Why push button twice on web

Yes, because I inherit values to the other document I call, and therfor I need to save it first.Thanks

Subject: RE: Why push button twice on web

I’m confused about how you expect this formula to work. The browser can’t execute formulas; they have to run on the server, so you have to submit the form and the server evaluates the formula and delivers a web page back to you in response to your submit. @SetTargetFrame, as executed by the server, it seems to me wouldn’t have any effect. When you open a web page in a new window, you have to open the new window first. Instead, you started by submitting a form, and you think the server is somehow going to do something that will cause the new URL to open in a new window. It’s too late – you already submitted the URL to display in the current window.

Unless you have disabled the “Use JavaScript” option of the database? In which case, the formula is attempted to be evaluated as the original page is generated to convert it to a URL. In that case, @Command([FileSave]) isn’t going to do anything.

Is there maybe some form Webquerysave agent that’s doing something funny when you save? Or a $$Return field that might be causing something to happen?

Have a look at the HTML/JavaScript code associated with this button. What is it telling the browser to do?