Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Im tyrying use following code to browse an image and preview it before uploading.Its not working for jpeg image.Can anybody suggest changes or new code for it
maxWidth) { y*=maxWidth/x; x=maxWidth; } if (y>maxHeight) { x*=maxHeight/y; y=maxHeight; } field.style.display=(x<1 || y<1)?"none":""; field.src=globalPic.src; field.width=x; alert("3."+field.width); field.height=y; alert("4."+field.height); } // End -->
Test it by locating a valid file on your hard drive:
Script submitted by: Sydney Wedding Video / DVD
Free JavaScripts provided
by The JavaScript Source
Comments
Comment #1
btopro CreditAttribution: btopro commented