PDA

View Full Version : Really basic ajax question



fshaw
03-02-2009, 01:06 PM
I am very new to javascript and ajax and have to get started in the very basic ajax script from my javascript.

Here is my javascript function:

How do i get started with the ajax ?




<script type="text/javascript"> function process_selected(form) {

alert('This is working!');


form.submit();
}

</script>



This is above my javascript function how do I setup some ajax to handshake between my javascript and a server side php function which is below.




trap_calandar_jump($jump)

{

switch ($jump) {

case 1:

// Logic here Jump drop down 1

break;

case 2:

// Logic here Jump drop down 2 the $me value = '2'

break;

case 3:

// Logic here Jump drop down 3

break;

}//switch

return $something;

}



Please help me get started by explaining how to get stsrted setting up my javascript to handshake with my php function using ajax.


THANKS

Frank H. Shaw

Master_script_maker
03-02-2009, 03:32 PM
I suggest you learn about ajax and how it interacts with php, rather than I just give you the answer and you not understand it. Here are some tutorials: http://www.tizag.com/ajaxTutorial/ http://www.learn-ajax-tutorial.com/