Do I need to change JavaScript code to include numeric values?
<p>I have an ajax file uploader plugin (<a href="http://www.phpf1.com/product/file-upload-script.html" rel="nofollow">Max's File Uploader</a>) where I copy and pasted the code and made some alterations.</p>

<p>Now below is a jQuery code where it measures if the file is successful, unsuccessful or cancelled:</p>

<pre><code>function stopImageUpload(success, imagefilename){

  var result = '';
  imagecounter++;

  var replaceForm = function(result) { 
    $(sourceImageForm).find('.imagef1_upload_form').html(result + '&lt;label&gt;Image File: &lt;input name="fileImage" class="fileImage" type="file"/&gt;&lt;/label&gt;&lt;br/&gt;&lt;br/&gt;&lt;label&gt;&lt;input type="submit" name="submitImageBtn" class="sbtnimage" value="Upload" /&gt;&lt;/label&gt;&lt;label&gt;&lt;input type="button" name="imageClear" class="imageClear" value="Clear File"/&gt;&lt;/label&gt;');
  } 

  var updateForm = function(result) { 
    $(sourceImageForm).find('.imagef1_upload_form').find('.display_content_image').html(result);
  } 

  var displayInfo;

  if (success === 1){
    result = '&lt;span class="imagemsg'+imagecounter+'"&gt;The file was uploaded successfully&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;';      
    $('.listImage').eq(window.lastUploadImageIndex).append('&lt;div&gt;' + htmlEncode(imagefilename) + '&lt;button type="button" class="deletefileimage" image_file_name="' + imagefilename + '"&gt;Remove&lt;/button&gt;&lt;br/&gt;&lt;hr/&gt;&lt;/div&gt;'); 
    displayInfo = replaceForm;      
  }
  else if (success === 2){
    result = '&lt;span class="imagemsg'+imagecounter+'"&gt; The file upload was canceled&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;';
    displayInfo = updateForm;    
  }
  else {
    result = '&lt;span class="imagemsg'+imagecounter+'"&gt;There was an error during file upload&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;';
    displayInfo = updateForm;  
  }
  displayInfo(result); 

)};
</code></pre>

<p>But I have a JavaScript function where it outputs this below in the PHP script:</p>

<pre><code>&lt;script language="javascript" type="text/javascript"&gt;
    window.top.stopImageUpload(&lt;?php echo $result ? 'true' : 'false'; ?&gt;, '&lt;?php echo $_FILES['fileImage']['name'] ?&gt;');
&lt;/script&gt;
</code></pre>

<p>What my question is, though, is that where it says 'true' or 'false' above, should this be 1 : 2 because I am measuring success of the files using numeric values and not string values?</p>
