jquery ajax and json are awesome

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
19,689
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jun 6, 2009

I used ajax before, but I never did it with jquery till I recently learned it. I have a function on my billing interface that pops up a box for the user to update some information. Well before I had write out the raw ajax script, checking for browsers etc, and then ajax would return a comma'd string that i would then split with javascript and then allocate that data somewhere. how naiive was I? Now i can just jquery to do the ajax and then return a JSON object with the data which is awesome! Its so much quicker and sooo much less code

  • likes, 2 dislikes

Link to this comment:

Share to:

Uploader Comments (optikalefxx)

  • you can get select/dropdown value using:

    var value = $("#mySelect :selected").val();

  • @miteshsura yep

  • I think you are potentially looking for the 'serialize' function inside of that jquery function in order to get the values you want, no? like,

    var mydata = $('#myform').serialize();

    serialize would be grabbing all your inputs within the form and putting them into one nice variable you can punch out quickly.

  • Your right. I discovered it last week lol. I'm making a video on it soon for my store.

Top Comments

  • you just saved a man's life here.. bless ya soul

Video Responses

This video is a response to jQuery For Absolute Beginners
see all

All Comments (16)

Sign In or Sign Up now to post a comment!
  • Thank you for sharing, I love code videos!

  • you can get all the data from a form using the JQuery function serialize() check it out in the documentation

  • Real neard.

    --

    But good video.

  • thank you - great vid

  • Nice :) This video was actually still useful to me though, as I learned jQuery first from a book and skipped this whole step. It's good to look back and understand/appreciate.

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more