Forum Home
Press F1
 
Thread ID: 43443 2004-03-15 02:50:00 java script for loop bliss (4037) Press F1
Post ID Timestamp Content User
222616 2004-03-15 02:50:00 What im trying to do is get a variables value and put it in to a for loop , the value is count. then im trying to add it to the end of the text in the for loop. so when it goes it will count through text1,text2 text3... and so on.

This loop is used to count through all the variables and test form data of an entry only .

coulkd someonr please help

sample..


function formval(){
var text1=document.book.sirn.value;
var text2=document.book.first.value;
var text3=document.book.street.value;
var text4=document.book.sub.value;
var text5=document.book.town.value;
var text6=document.book.count.value;
var text7=document.book.phn.value;
var text8=document.book.email.value;
var count=0;

for (i=0; i < 8; i++){
count++
//if (text+[count]=="")
if (text('count')=="")
alert("alert enter personal details")
bliss (4037)
1