WEB Ajax crew: What exactly do i need to look into to get this idea working

Discussion in 'OT Technology' started by Ricky, Apr 22, 2009.

  1. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,767
    Likes Received:
    6
    Well basically right now i have an html form, with a text input. I set it up basically so when theres an "onchange" it'll submit the form automatically. I like this, but i dont like how basically the form works. It refreshes the page and removes the input.

    I figured in order to have it complete my post action in the form, without refreshign the page i will need some sort of ajax.

    What funtions exactly will i need to focus and research on in order to complete this.

    Thanks
     
  2. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    you don't need ajax really.. just javascript.

    instead of submitting the form, call a javacript function that sends the form info for you
     
  3. biawokauns

    biawokauns New Member

    Joined:
    Sep 18, 2001
    Messages:
    19,893
    Likes Received:
    0
    Location:
    Republic of Kalifornia
    look into jquery, it will allow you simplfy your JS experience
     
  4. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,767
    Likes Received:
    6
    ahh alright. i will take a look on google and see what i can find.
     
  5. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,767
    Likes Received:
    6
    Ive been checking out some examples of jquery. its pretty neat but i think what im trying to do is a little over my head and kind of impossible.

    I have this form right. Lets say there are two fields.

    One for their name and one for their age.

    The first field, i want the user to enter in their name. onchange it will then post their name data to my php script located on the same page. my script will go to google images and imbed the first image right underneath the field. I also want to save their name in a variable. all of this done at once through an onchange without hitting the submit button.

    The second field is going to simply be their name.

    then once they submit it, i want the first variable, which has already been posted and the second field to be entered into my database.

    I just want to know, is it possible to save the first field into a variable and be used later on in maybe a second form if necessary ?
     

Share This Page