Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Preview an image?

    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.

    http://dvclan.org/Dynamic/avatarmaker/


    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.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #4
    Senior Coder
    Join Date
    Mar 2003
    Location
    Atlanta
    Posts
    1,037
    Thanks
    14
    Thanked 30 Times in 28 Posts
    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.
    Most of my questions/posts are fairly straightforward and simple. I post long verbose messages in an attempt to be thorough.

  • #5
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #6
    Senior Coder
    Join Date
    Mar 2003
    Location
    Atlanta
    Posts
    1,037
    Thanks
    14
    Thanked 30 Times in 28 Posts
    Using prototype will ease your AJAX pain. Here is tutorial on how to use it. ITS REALLY SIMPLE Here's the tutorial.
    Here's part 2

    Most of my questions/posts are fairly straightforward and simple. I post long verbose messages in an attempt to be thorough.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •