Post File

We include our ‘core’ library, in the header


    <script src="../Include/Core.js" type="text/javascript"></script>
          

Post File is similar to Grab File, but acts on form submissions, rather than a hyperlinks.

ssPostFile submits a form, but its response is returned in an ajax way, replacing the contents of an element.

The target element (a div or a span) and the id of the form are passed in as parameters.


    ssPostFile("detailsbox","frmMain");
          
  • The target page is extracted from the "action" property of the form.
  • The form is submitted as a ‘post’, so the target page needs to pull in form items, not query strings.
  • As with ssGrabFile, the response can be debugged using Firebug’s Console.