robert_gsfame Posted April 28, 2010 Share Posted April 28, 2010 I have two form n i wish to move the record from first form to another form var lengthx=document.form4.elements.length; var length=document.form3.elements.length; var choosex=""; for(var x=0;x<lengthx;x++){ if(document.form4.elements[x].type=="checkbox"){ for(var y=0;y<length;y++){ if(document.form4.elements[x].value!==document.form3.elements[y].value){ choosex=choosex+"<tr><td>"+document.form3.elements[y].value+"</td></tr>";}}}} document.getElementById("datauser").innerHTML="<form name=form4><table width=357>"+choose+"</table></form>"; } when i choose one record from form3, everything goes correctly...but when i choose more records at the same time then records in form3 duplicate so if let say i have 4 records and i choose 2 records then i will have 8 records which part of looping is incorrect?? thx Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted April 28, 2010 Share Posted April 28, 2010 I don't know why phpfreaks put a bolded-red statement stating users to read the rules before posting when everyone ignores it. Read #4 of Forum DOs. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.