Save button with javascript

Hi,

I’ve a button on a web form that should save the document and opens a thanks form.

I use this code

submit()

window.location=“bedankt?openform”;

When I now press this button the document will not be saved, it only opens the thanks form.

How can I solve this.

rgds,

rudy

Subject: Save button with javascript

use @commando([FileSave])This commando works on the web

Subject: Save button with javascript

To save a document you must write document.forms[0].submit();

Subject: Save button with javascript

To save a document you must write:

document.forms[0].submit();

Subject: RE: Save button with javascript

This works when i don’t add

window.location=“bedankt?openform”

behind it.

When I add it behind it only the thanks form will open and it will not save the document

Subject: RE: Save button with javascript

You have a choice: submit the form OR go to a new location. You can’t do both with the same bit of code. In this case, a $$Return field on your main form should be pointing your user to the Thank-you form.

Subject: RE: Save button with javascript

Hi Stan,

Thanks this works for me!

Rgds,

Rudy