How would I check for an image's size and reject images that are above a certain size, giving the user a pop up message telling them to choose a smaller file if they try to insert one thats too big?
I found this script that i've been trying to make work:
if(image1.value.image.value.length > 1400000)
{
this.validationMessage = "Image larger than 1MB . Please select a smaller image.";
0;
}
but it keeps giving me a 'validate failed' message.
Can anyone help me with this? I have very little javascript knowledge and just need to do this one thing that is driving me nutty.
Here is an example file
https://share.acrobat.com/adc/document.do?docid=69eaf83f-6435-4e91-8a9f-7ce43a4b1d9b
But, this will not stop the import of the image it only will alert the user through the message.
radzmar
• LoveCycle Blog
Documents you need:
• LiveCycle Designer ES2 Docs