Showing posts with label submission. Show all posts
Showing posts with label submission. Show all posts

2005-11-14

Notes - Web: bypassing the $$Return field

To avoid the processing of the $$Return field, save the document with the command:
@Command([FileSave])

If using Javascript then instead of using document.forms[0].submit(), create a button with the above formula and give it an id (ex:bt_save) and then on the submit script do:
 
document.all.bt_save.click()

 


The url of the document will be the original one (http://server_name//database_name/form_name?OpenForm), with "&Seq=1" (2,3,...) appended in the end.

2005-11-11

Notes - Web: simulate notes client continue=false behaviour on web save

Form:
(Server_Name e Path_Info are CGI fields)


. field SaveOptions=0
. field $$Return= "[http://" + Server_Name + @Left(Path_Info;"nsf") + "nsf/0/"+ @Text(@DocumentUniqueID) + "?OpenDocument]"



WebQuerySaveAgent:
(if the validation fails, then the doc will not be saved because of the SaveOptions field value)

if (validateForm) doc.SaveOptions=1



Form - onload:
(optionally)
if (document.all.field_error.value!="") alert("Document not saved. \n Errors:" + document.all.field_error.value)