ITPFileQuestion

A descendant of ITPQuestion, representing a file question on a form. If ActiveX can be used, it transforms the file input to a text input with an adjacent button, using the ActiveX control. No validation, existence of the file checked by ActiveX upon submission.

constructor

ITPFileQuestion

Trivial

public methods

-

overrides

initScreenElements()

Turns the HTML-file upload control into an ActiveX-version, if this is possible (IE) and requested (fileEditActiveX variable).

prepareForSubmission

If ActiveX is used, uploads the file to ITP/Server and stores the result in a hidden input (for posting).

getScreenAnswer()

If ActiveX is used, returns the selected file path. This is not possible by using the HTML control.

setScreenAnswer(pAnswer)

If ActiveX is used, it sets the selected file path. This is not possible using the HTML control.

other methods

browse()

Opens the file browser through the ActiveX control.

testActiveX(pScreenElements, pAttemptsLeft)

Checks if the ActiveX control is available. If this it not the case, it will retry for pAttemptsLeft times. If this fails, the question will fall back to the standard HTML file upload control.