X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=therapies%2Fautosave.js;fp=therapies%2Fautosave.js;h=665a6011463ff7de12fa5e064847910805be58c1;hb=4e07a73ed0ab92f276d1d8ce6942bd92651efc3d;hp=b4020ddce94ca1a4db7cfbcccfb81af67ea3849e;hpb=0aa4aa6d57b76d6ca32eb502e422b5f02bed3402;p=lobster diff --git a/therapies/autosave.js b/therapies/autosave.js index b4020dd..665a601 100644 --- a/therapies/autosave.js +++ b/therapies/autosave.js @@ -4,6 +4,7 @@ var formdata = ''; function postsubmit(){ if ( this.status == 200 ) { + document.querySelector('#report input[name="tid"]').setAttribute('value', this.response); console.log('successful auto submit of form data'); button.setAttribute('style', 'display: none;'); } else { @@ -18,7 +19,7 @@ function failsubmit(){ function formencode(fd){ var send; - send='autosubmit=false'; + send='autosubmit=true'; for (var tup of fd.entries()){ send += '&' + encodeURIComponent(tup[0]) + '=' + encodeURIComponent(tup[1]); }