I have the following code in my html file:
<form enctype="multipart/form-data" class="form1" name="form1">
<input type="button" id="button1" class="button1" value="Update 1"/>
<input name="archivo1" type="file" class="archivo1" id="archivo1" />
</form>
<form enctype="multipart/form-data" class="form2">
<input type="button" id="button2" class="button2" value="Update 2"/>
<input name="archivo2" type="file" class="archivo2" id="archivo2" />
</form>
So, I want to detect automatically any change of any file and make different actions depending on the file selected. If I use
$(':file').change(function()
{
//Code here
}
I want to know if I select the file named as archivo1 or the file named as archivo2. Any suggestions?
Regards!