Now, I'm trying to retrieve the value from this fields with javascript, using the script below.
var bookingForm = document.forms['formName'];
var qty = bookingForm.fieldName +'i'.value;
with the 'i' been a generated numeric number by a for loop
when I use alert(qty), it returns NaN, when I'm expecting the value for fieldName1, fieldName2.. and so on.
But when I use;
var qty = bookingForm.fieldName.valueI can get the value in that field but get NaN when I try to concantenate 1,2,3... with the fieldName.
I need help to resolve this problem. I'm very new to javscript ( I have not learnt it yet), but need to get this done so badly.
Your help will be very much appreciated.


Sign In
Create Account

Back to top









