Uploaded Image Do Not Display On The Form Why?

Welcome. Please Login, Register, Or Activate! 
type your username and password to login
Date: November 25, 2009, 11:33 AM
432305 members and 299282 Topics
Latest Member: truth-bank
Nairaland [Nigerian Forum] Home Help Search Who is currently online? Login Register
Nairaland Forum  |  Technology  |  Webmasters (Moderators: OmniPotens, yawa-ti-de)  |  Uploaded Image Do Not Display On The Form Why?
Pages: (1) Go Down Send this topic Notify of replies
Author Topic: Uploaded Image Do Not Display On The Form Why?  (Read 53 views)
pagolina
Uploaded Image Do Not Display On The Form Why?
« on: August 21, 2009, 03:06 PM »

hello every body!

i have a form, i want client to upload there passport (image)
so i use a file upload field (form object) and yes they can brows for file and upload
but what i see is the path and the image did not display for them to view it on the form beform submitting it. pls i want the  image to display,  also i want to choose the file types and size b/4 the form will accept it, how do i get that?

i make use of php/mysql
imagine you are bulding a web form that somebody can upload image what do you do?
yawa-ti-de (f)
Re: Uploaded Image Do Not Display On The Form Why?
« #1 on: August 21, 2009, 03:30 PM »

the image won't display unless u use some javascript function, via an event (like onchange or whatever) to trigger once the image link is in the text field.

For file type and size, I believe you do that within the php.  There are functions (ready-made) that do that already.  I forget which library it is, though I think it is gd extension.  Check it out.

Good luck!
pagolina
Re: Uploaded Image Do Not Display On The Form Why?
« #2 on: August 21, 2009, 03:36 PM »

ya-wa-ti-de, thank you very much for your contribution

is there any place i can get prewriten javascript for that? and how to use it with my form
*dhtml
Re: Uploaded Image Do Not Display On The Form Why?
« #3 on: August 21, 2009, 03:44 PM »

Quote
<img id="d" style="display:none"/>

<form>
<input type="file" onchange="d.src=this.value;d.style.display='block';">
</form>
Something like that. The remaining yawatide told u already
 Enabling Of Upcoming Event/birthday  Contemporary Furnishings  You Can Make It Big By Being A Reseller Webhost.  Page 2
Pages: (1) Go Up Send Topic to Friend by E-mail Reply 


Sections: Autos/Cars (2) Jobs/Vacancies (2) (3) Career Talk Education General(2) Politics Romance Computers Phones Travel
Sports Fashion Health Religion Celebrities TV/Movies (2) Music/Radio (2) Books Webmasters Programming

Links: Page1 Page2 Page3 Page4 Page5 Page6 Page7 Page8 Page9 Page10

Nairaland is owned by Oluwaseun Osewa. See also: Nairalist Classified Ads
Nairaland Forum | Powered by SMF 1.0.12.
© 2001-2005, Lewis Media. All Rights Reserved.