I have an markup
Firefox doesn't support windows.event
object. Use these variables to store the value and it will work after that use your code:
var event = e || window.event
var assumed = (event.target || event.srcElement).id;
try this:
Tested and 100% working
You can Combine here event and this(element)
function postBackByObject(e,d) {
var target = e.target || e.srcElement; // Support IE6-8
if (d.id == 'uploadControl') {
document.getElementById('labelId').click();
}
target.cancelBubble = true;
}
<div id="uploadControl" class="fileUpload1"
onclick="postBackByObject(event,this);">
<label for="uploadFile" id="labelId">Choose File</label>
<input class="upload" type="file" id="uploadFile" />
</div>