|
|
Get image width and height before upload
Hi
Is it possible to somehow get the width and height of an image that is not
uploaded yet.
Ex.
<input name="upload" type="file" onchange="some javascript that sends the
width and height to a div like getElementById">
So when is click browse and finds an image it will write the width and
height in a div somewhere else on the page.
So it is before the form is submittet ?
It would also be ok if it was a button you clicked after you have browsed
you image.
It just has to be before upload..
|
|
0
|
|
|
|
Reply
|
EnjoyNews
|
9/13/2008 8:24:20 AM |
|
EnjoyNews wrote:
> Is it possible to somehow get the width and height of an image that is not
> uploaded yet.
>
> Ex.
> <input name="upload" type="file" onchange="some javascript that sends the
> width and height to a div like getElementById">
> So when is click browse and finds an image it will write the width and
> height in a div somewhere else on the page.
>
> So it is before the form is submittet ?
>
> It would also be ok if it was a button you clicked after you have browsed
> you image.
> It just has to be before upload..
This is impossible due to security restrictions. The only way is to
first upload the file.
--
Bart
|
|
0
|
|
|
|
Reply
|
Bart
|
9/13/2008 8:57:47 AM
|
|
"Bart Van der Donck" <bart@nijlen.com> skrev i en meddelelse
news:70acd5ec-35f9-4a12-8527-51b3faf4084e@e53g2000hsa.googlegroups.com...
> EnjoyNews wrote:
>
>> Is it possible to somehow get the width and height of an image that is
>> not
>> uploaded yet.
>>
>> Ex.
>> <input name="upload" type="file" onchange="some javascript that sends the
>> width and height to a div like getElementById">
>> So when is click browse and finds an image it will write the width and
>> height in a div somewhere else on the page.
>>
>> So it is before the form is submittet ?
>>
>> It would also be ok if it was a button you clicked after you have browsed
>> you image.
>> It just has to be before upload..
>
> This is impossible due to security restrictions. The only way is to
> first upload the file.
>
> --
> Bart
Thanks...
But how can I upload the file without submitting the form ?
|
|
0
|
|
|
|
Reply
|
EnjoyNews
|
9/13/2008 9:12:33 AM
|
|
EnjoyNews wrote:
> ...
> But how can I upload the file without submitting the form ?
The form must be submitted anyhow, either by a manual action of the
user or instructed by the following javascript command:
documents.forms[0].submit()
(in case there is only one form on the page)
The file must first be manually selected by the user in any case.
--
Bart
|
|
0
|
|
|
|
Reply
|
Bart
|
9/13/2008 9:19:24 AM
|
|
Bart Van der Donck wrote:
> =A0 documents.forms[0].submit()
document.forms[0].submit()
--
Bart
|
|
0
|
|
|
|
Reply
|
Bart
|
9/13/2008 9:20:50 AM
|
|
|
4 Replies
534 Views
(page loaded in 0.099 seconds)
Similiar Articles: Get image width and height before upload - comp.lang.javascript ...Image Width and Height Before Uploading Image File: PHP, ALL Hello Everyone Can Anyone Tell me is there a way where in can get the image width and height before ... Image Upload in GUI - comp.soft-sys.matlabShow image from comboBox selected - comp.lang.java.help disable jcombobox item - comp.lang.java.gui Show image from comboBox ... Get image width and height before upload ... Image Preview in javascript while uploading the images - comp.lang ...My Canon S40 Camera produces pictures which ... We probably hear from those who do, while ... Get image width and height before upload - comp.lang.javascript ... Fit Height option? - comp.text.pdfI'm having an File Upload option in my web page, there i ... Picture Size vs. Standard Frame size - comp.graphics ... Get image width and height before upload - comp.lang ... how to create file upload using activeX object using javascript ...I'm having an File Upload option in my web page, there i'm having one more ... sys.matlab Image Upload in ... Get image width and height before upload - comp.lang ... problem with poi and row height - comp.lang.java.programmer ...... problem with poi and row height - comp.lang.java.programmer ... JTable Row Height Problem - comp.lang.java.gui I'm having the ... Get image width and height before upload ... How to resize image using javascript codes - comp.graphics.apps ...... to the same size. Do you want to have PSP resize your images to a certain size before you upload them ... You can set width and height in html code but if the image is ... FBO and reading with glReadPixels - comp.graphics.api.opengl ...... for glutInitWindowSize(), glViewport(), and gluPerspective() //(If my image width and height ... When I read from the normal framebuffer, before using FBO with my code, every ... Transparency of BMP image pixels - comp.graphics.api.opengl ...... transparent is the very last to be "drawn" into the current buffer before ... transparent // DWORD w, h, ws, wd, x, y, k, c; BYTE *p, *q; // width and height of image in ... Using itext to convert tiff document - comp.text.pdfI'd suggest discussing this on the iText-ML before going ... scale to fit will change the dimensions of the image, so that it fits a rectangle with width = 500, and height ... Get image width and height before upload - comp.lang.javascript ...Image Width and Height Before Uploading Image File: PHP, ALL Hello Everyone Can Anyone Tell me is there a way where in can get the image width and height before ... Get image width and height before upload - JavaScript / Ajax / DHTMLGet image width and height before upload. JavaScript / Ajax / DHTML Forums on Bytes. 7/23/2012 1:25:52 AM
|
|
|
|
|
|
|
|
|