anchor.diff:  		<portlet:param name="render" value="renderView" />
   	</portlet:renderURL>
   	<a class="btn" href="${renderView}">Cancel</a>
  -	
  +
  +<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-3.1.0.min.js"></script>
  +
  +<script type="text/javascript">
  +	function showWeight() {
  +		var totalRate = parseInt(0);
  +		var allWeights = $(".weightPage");
  +		
  +		// Get the weight total
  +		allWeights.each(function() {
  +			if (!(this.value == "" || isNaN(this.value)) && this.value > 0) {
  +				totalRate += parseFloat(this.value);
  +			}
  +			else {
  +				this.value = "0";
  +			}
  +			
  +		});
  +		
  +		// Set the percent value according to the total
  +		allWeights.each(function() {
  +			var percentDisplay = $(this).parent().next();
  +			var percentValue = "0.00%";
  +			
  +			if (!(this.value == "" || isNaN(this.value)) && this.value > 0) {
  +				percentValue = ( (this.value / totalRate) * 100 ).toFixed(2) + " %";
  +			}
  +			percentDisplay.text(percentValue);
  +			
  +		});
  +	}
  +	showWeight();
  +</script>
   </aui:form>
   
   
  
positive.code: 				<th>Name</th>
  				<th>Url</th>
  				<th>Weight</th>
  			</tr>
  		</thead>
  		
  
negative.code: 					<td>${url.friendlyUrl}</td>
  					<td>${url.url}</td>
  					<td>
  						<input type="number" name="<%=renderResponse.getNamespace()%>${url.friendlyUrl}" value="${url.weight}" onChange="showWeight()" class="weightPage">
  					</td>
  					<td><span class='percent'>0.00%</span></td>
  				</tr>
  			</c:forEach>
  		</tbody>
  