Clarizen V4.5 New Feature Overview Video
Coming really soon, a new and exciting version of Clarizen.
No commentsClearing an input of type=’file’
For obvious reasons, one cannot clear an input of type ‘file’ (in fact, the ‘value’ cannot be changed at all). Previous attempts to achieve this using setAttribute or direct access to the ‘value’ property has failed.
Our guys @ the UI team has found a useful workaround:
-
-
function resetUploadControl(control)
-
{
-
var parent = control.parentNode;
-
parent.removeChild(control);
-
-
var tempForm = document.createElement("form");
-
tempForm.appendChild(control);
-
tempForm.reset();
-
tempForm.removeChild(control);
-
tempForm = null;
-
-
parent.appendChild(control);
-
}
-
First, grab the elements’ parent, remove the control from it and append it to a temporary form. Input elements of type file can only be cleared by resetting the form they are part of, thus the temp form.
After resetting (and achieving our empty-valued input goal), re-append the control to its original parent and destroy the temp form. Mission accomplished! :)
Credit goes to Ori Roniger & Vadim Kononov
No commentsProud to be part of the team
It was just published that Clarizen has secured $8M in financing from leading VCs.
I joined Clarizen about 5 months ago, working for the UI/UX team.


