View Full Version : Preview an image?
07-27-2007, 06:48 PM
Alright, I am currently working on a Avatar generator, based on sprites of the game Squeebs which is a really small and olny a few days old.
I want to be able to preview the image while in creation.
Here is the link to the Generator.
How would I go about doing this?
Not sure if you can do it with php, but if not, tell me what language and direct me in the right direction.
07-27-2007, 06:54 PM
You would use php to upload the file, once on the server you can preview the image, if you accept it do nothing, if you cancel it then unlink() the file just uploaded.
07-27-2007, 07:04 PM
Umm, I am not quite sure what you mean :x
I am using the GD library to show the image, and using $_get to get the image specifics, then the user can download the image, and re-upload on their own host.
07-28-2007, 08:12 AM
Seems to me as if you need to use AJAX to send the form values to the server every time a user makes a change in the form. Have the AJAX submit the values for the select box with the onchange event. Not sure of how much of a server hit that'll be.
07-29-2007, 02:08 AM
Thnx, I was guessing it would be AJAX, Just didn't wana suggest it cause I dont know any AJAX.
Guess Ill start learning AJAX, thnx.
07-29-2007, 09:46 AM
Using prototype (http://www.prototypejs.org/) will ease your AJAX pain. Here is tutorial on how to use it. ITS REALLY SIMPLE :) Here's the tutorial. (http://www.ajaxtutorial.net/index.php/2006/11/29/simple-ajax-using-prototype-part-1/)
Here's part 2 (http://www.ajaxtutorial.net/index.php/2006/11/30/simple-ajax-using-prototype-part-2/)
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.