The trick is to set the target frame property which is below the WebQuerySave property to the name of a frame or iframe.
We used "steve" for no particular reason, though "graham" (Simmons) and "doug" (Tait) were involved.
NB I tried setting this to be a field but it didn't work, disappointingly.
Now the result of setting target frame property is that the result of a
@command([FileSave])
or even
@Command([FileSave]);
@Command([FileCloseWindow])
in a button (possibly using a WebQuerySave) is to paste the result into a frame or an existing iframe or a new frame.
To use an iframe with no borders can create a pseudo ajax effect without a round trip:
<iframe frameborder=0 name="steve" id="steve" src="" width=200 height=200 ></iframe>
or a tiny 1 pixel high 1 pixel wide iframe would give a silent save (Doug Tait likes this).
To put the result into a small pop up window on saving or submitting stick this code into the onsubmit event.
opt='height=550, width=500, menubar=no,statusbar=no,titlebar=no, screenX=200, screenY=100, left=200, top=100, resizable=no,scrollbars=no';
var remote=open(' ,'steve', opt );
(NB if you have an iframe already called Steve this will not work)
If you do not have the onsubmit or an iframe a new window will be created, which might also be useful, but using the onsubmit allows the dimensions to be preset.
Nice Eh?