I need to be able to programatically click a Submit button in a Acro Form. The submit button is configured to submit the form data to a web application.
I need to be able to programatically click a Submit button in a Acro Form. The submit button is configured to submit the form data to a web application.
Example 1
Submit the form to the server.
this.submitForm("http://myserver/cgi-bin/myscript.cgi#FDF");
Example 2
var aSubmitFields = new Array( "name", "id", "score" );
this.submitForm({
cURL: "http://myserver/cgi-bin/myscript.cgi#FDF",
aFields: aSubmitFields,
cSubmitAs: "FDF" // the default, not needed here
});
Example 3
A form is submitted to a server using a SOAP-based invocation.
// Populate the content object with form and SOAP information:
var location = "http://myserver/parentfolder/subfolder1/subfolder2/"
var formtype = location + "encodedTypes:FormData";
var content = new Array();
for(var i = 0; i < document.numFields; i++) {
var name = document.getNthFieldName(i);
var field = document.getField(name);
content[i] = new Object();
content[i].soapType = formtype;
content[i].name = field.name;
content[i].val = field.value;
}
// Send the form to the server:
SOAP.request({
cURL: cURL,
oRequest: {
location + ":submitForm":
{
content: content
}
},
cAction: location + "submitForm"
}
Hope this helps.
My favorite quote - "Success is the ability to go from one failure to another with no loss of enthusiasm.