I have a form where I check the character limit a user can put in a textfield and the 'onkeyup' attribute updates this in realtime
Now I want to do the same thing for image uploading where as soon as a user selects an Image from his computer that I want to update the counter (note: select not yet send the form). image showing what i want to do:
As can be seen in this picture, I want the 0/10 to become 1/10 here since an image (to be uploaded later) has been selected:
If someone is kind enough to help me, I would like to use this occasion to ask a side question regarding the same issue: The code I use looks as follows:
<tr>
<td></td>
<td><input id="pictureInputBox" type="file" name="pictureInputBox"/></td>
<td class="formhelp"></td>
</tr>
<tr>
<td></td>
<td><a href="#" id="AddMorePicturesBox" onclick="checkPictureCount();">Add More Pictures</a></td>
<td class="formhelp"></td>
</tr>
How can I make another "pictureInputBox" appear when clicking on the link with setting a maximum of 10 of these to appear (one at a time)?
Kind regards, Dennis