I am trying to use the following fiddle in my code with few differences :
The HTML is :
<div class="col-md-6">
<div class="inputBtnSection">
<input id="uploadFile" class="disableInputField" placeholder="Hi" disabled="disabled" />
<label class="fileUpload">
<input id="uploadBtn" type="file" class="upload" />
<span class="uploadBtn">Upload / Browse File ..</span>
</label>
</div>
</div>
In Javascript, since I have to use jQuery 1.6.1, the on
method/function doesn’t work and hence I am using live
as shown below:
$('.fileUpload').live('click','.fileUpload',function()
{
//alert("The text has been changed."); // this works fine if I uncomment it
$("#uploadFile").val() = this.val();
});
When I click on Upload/Browse File
, I get Uncaught ReferenceError: Invalid left-hand side in assignment
error in the console. Please let me know what am I doing wrong here? Thanks