Feb 1, 2000, 6:32 PM
Post #3 of 3
Hmm .. you know what?
Re: Restricting user image by file size and dimensions
[In reply to]
<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>
<input type="hidden" name="(image)width" value=document.(image).width>
<input type="hidden" name="(image)height" value=document.(image).height>
Where name (image) is split from the URL entered by the user.
eg: http://www.place.com/anthony.jpg would place (image) as anthony, so the name would be anthonyheight and value would be document.anthony.height
(all this by using patterns and so on)
So, if those hidden values exceed my specifications (say 250x300) a hypertext link is portrayed instead of embedding the image.
However, I haven't tested whether the image has to physically post first to set those values for W and H.
And I just realized more than one person could name the pic 'anthony' though with different URLs. So, more than just the image name could be used .. perhaps the entire URL as (image)height.
*just spouting ideas -- no, of course I haven't thought EVERYTHING through yet*
*that is what this place is for, no?*