loop checking checking in javascript -


I have several files to upload to a PHP page. Two of those that require that area are required To check out I wrote a JS in my JS, file type 1 & amp; 2 Essential types are: counting is the number of files to upload. (I = 1; i & lt; = count; i ++) for <

  {if (file_type == 1 || File_type == 2} {found1 ++; }}   

When submitting found1 will be form submission as 2 . But there is a problem here that the required field '1' is being created as a flag value and twice as "code> 2 and form submission will be done. My requirement '1' is to be included in the form submission in '2'. How will this solve?

This will work, but there should be better ways. upload file file, incorrect for file2Uploaded = (i = 1; i & lt; = count; i ++) {if (file_type == 1} {file1Uploaded = true;} And if (file_type == 2) {file2Uploaded = true;}}

check

  if (file 1 upload and file2 upload) { // submit form}    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -