how to hide fields in html if fields are empty and the image src also. using java script. please suggest
<div id="pagewrapper" >
<div class="row" >
<div class="column-half" style="width:500px">
<div class="containerdiv" >
<form:label path="file4Desc" type="text" value="" maxlength="50">
</form:label>
<form:input path="file4Desc" value="${agreement.file4Desc}"
style="width:300px"/>
<font color="red"><form:errors path="file4Desc" /></font>
</div>
</div>
<div class="column-half" style="width:13%">
<div class="containerdiv">
<form:label path="filename3" type="text" value="" maxlength="50">
</form:label>
<a href="${pageContext.request.contextPath}/customer/viewDownload3/${agreement.agreementId}.htm">
<img src="${pageContext.request.contextPath}/resources/images/download3.gif"
border="0"
title="Download this document"/>
</a>
</div>
</div>
</div>
</div>