Results 1 to 2 of 2

Thread: Really basic ajax question

  1. #1
    Join Date
    Mar 2009
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Really basic ajax question

    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 ?

    PHP Code:

    <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.

    PHP Code:

    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

  2. #2
    Join Date
    Jun 2007
    Posts
    543
    Thanks
    3
    Thanked 78 Times in 78 Posts
    Blog Entries
    1

    Default

    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/
    [Jasme Library (Javascript Motion Effects)] My Site
    /\/\@ /\/\@|{
    There are 10 kinds of people in the world, those that understand binary and those that don't.

Bookmarks

Posting Permissions

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