Jump to content

How to combine normal fiels and field that are in an loop?


Muiter

Recommended Posts

function materiaalkost(selectVeld, nr){   // Stuur informatie terug	if (document.getElementsByName('inkoop[]')[nr].value == '')	{		document.getElementsByName('materiaalkost[]')[nr].value  = (document.getElementsByName('gewicht_stk[]')[nr].value * (document.getElementsByName('inkoop_b').value / 1000)).toFixed( 2 )	}	else	{		document.getElementsByName('materiaalkost[]')[nr].value  = (document.getElementsByName('gewicht_stk[]')[nr].value * (document.getElementsByName('inkoop[]')[nr].value / 1000)).toFixed( 2 )	}}

With the above code I'm trying to manipulate the 'materiaalkost[]' field. This field is in an loop. When the field 'inkoop[]' is not used the script should use the 'inkoop_b' field, this field is not in the for loop. For some reason even when 'inkoop[]' is not used this field is used but it should use the field 'inkoop_b'.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...