views:

377

answers:

6

I want ajax application to process a simple form with textinput and submit button only , and without validation , i want to add this with a php script . I ask this because i don't know how to program with ajax or javascript .

+3  A: 

I would highly recommend using jQuery -- there are some good tutorials (some are video) available at jQuery for Designers.

Ryan Lanciaux
+1  A: 

You should use a javascript library such as jQuery or prototype. You'll also find some tutorials there. If you want to do it yourself, read about XMLHttpRequest.

okoman
+2  A: 

Before you dive onto jQuery (which I recommend), it may help to start with a really simple tutorial to get an understanding of what's happening.

Ajax Beginners Tutorial may help.

Galwegian
A: 

You can use the ajaxSubmit plugin for jQuery.

After you include jquery and the plugin in the html you just add

$(document).ready(function () {
    $('form').ajaxSubmit('#result');
});

Where "result" is the id of the div where you want the results to go.

Pat
+3  A: 

Honestly, you're not going to get anywhere without learning javascript. You should really look into learn it, it's not that complex of a language either. Ajax isn't actually a language, it's a function, a feature so to speak. Once you get the hang of using it, it's not difficult either, and frameworks like JQuery and MooTools will make it a lot easier.

www.w3schools.com is a good place to learn javascript, don't worry if you're constantly looking things up while learning it, even the best of us have to do so. And never be afraid of asking questions, that's how you learn.

If you know php, javascript would be relatively simple to pick up. One thing to keep in mind when using AJAX is that you remove the users ability to hit the back button or bookmark a page, because the use isn't taken to a new page.

Malfist
A: 

I know this isn't technically on topic but I wanted to make a quick point about AJAX and user's back buttons - there is a plugin for jQuery which sorts this out. If you use the monolithic YUI there is also a History Manager packaged with that as well.

Rob
I mean that it's large in size (10+MB) for a Javascript library. Compare that to jQuery (94Kb, uncompressed).
Rob