setHTTPFormFields()

Description

Sets text fields in the web form which will be sent to the server along with the images.

Syntax

ImageViewerObject.io.setHTTPFormFields(iValue);

Parameters

<JSON> iValue: the value to set.

Return value

<bool>

Remarks

The default value is {}. JSON format:{"fieldName": "fieldValue", "fieldName": "fieldValue",...}

When an error occurs, check getErrorCode() or getErrorString() for error information.

Example

             var imageviewer = DCSObject.getImageViewer ("ImageViewerContainer");  // Get a specified image viewer
             imageviewer.ui.setHTTPFormFields({"Author": "Tom", "Description": "Personal file"});
             var formfields = imageviewer.ui.getHTTPFormFields();  
             var author = formfields.Author;
             var description = formfields.Description;
      

See also

.io.getHTTPFormFields()
.io.httpUpload()
.io.httpUploadAsync()