0 Replies Latest reply on Dec 5, 2009 10:29 PM by gunnerstudio

    Using "post" function



      Using "post" function


      Hi all great filemaker programmers.


      Im stucked with a problem for days. i would like to use the post command as a script inside of filemaker 10 pro adv windows.

      i got a java paint program using webviewer, that got a save button using html and the "post" function.


      I would like to create a 1 script that uses the post function and a script that uploads the image saved into a container field.


      At my current version the user has to save twice. 


      1. Saving the image inside webviewer, to a localhost.

      2. Uploading the image to a container field. as a referance or as a file.


      I would like make it simpler for the user, so when they press continue the image are saved as stored correctly. the image file can be unique (imagexxxx.png) or image.png. 


      I have tried several function but no luck. I have had a look at 360 script master post to url. but couldnt get it to work.  

      other function I have tried is entering this one as script step "set webviewer."

      <html><body>< form method=\"post\" action=\"save.php\">

      <input type=\"text\" name=\"image\"> </form>




      < form method="post" action="save.php">

      <input type="text" name="image"> </form>




      <script language="JavaScript"><!--


      // This function is called when the user presses the from button "Save".

      // It assign the image data to the hidden form field "image".

      function attachImage() {


          var painter = document.applets["painter"];


          if (painter.isChanged()) {

              var save_options = 'format:PNG';

              var image = painter.getImage(save_options);

              painter.showProgress("Saving the image ...");

      if (image != "") {

                  document.saveform.image.value = image;

              return true;


      else {


         window.alert("Error while extracting image.\nProbably incorrect license.");



          else {

           window.alert('Image was not changed. There is nothing to save');


          return false;


      // --></script> 


      any help would be appreciated!


      Kind Regards