• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ajax Request

#26
[eluser]Nutan Lade[/eluser]
Yes it is working without ajax.When I am making direct request to the server.

And I had one more problem with this have a look at the code:

Code:
function addMovieName(){          
  var movieName = addMovieForm.autocomplete.value;
  //alert(movieName);
    var url = "<?=base_url()?>index.php/gadgets/addMovieByName/"+movieName+"/1";
        //alert(url);
        new Ajax.Request(url, {
        method: 'post',
        parameters: {userId: 1},
        onComplete: function(addMovieName){
          var response = addMovieName.responseText || "no response text";
         // document.getElementById(indicator1)[removed] = response;
            alert("Success! \n\n" + response);
        },
        onFailure: function(){ alert('Something went wrong...') }
          });
  }
<form id="addMovieForm" action="<?=base_url()?>index.php/gadgets/addMovieByName" method="post">
<input type="text" id="autocomplete" name="autocomplete" >
<input type="submit" value="Add" id="addMovie" name="addMovie" >

on the server

Code:
function addMovieByName(){
        echo "hello";
        
        var_dump($_GET); exit;
        
            }

I am getting error in the console prototype is not defined.


Messages In This Thread
Ajax Request - by El Forum - 08-25-2008, 09:05 AM
Ajax Request - by El Forum - 08-25-2008, 09:35 AM
Ajax Request - by El Forum - 08-25-2008, 10:33 AM
Ajax Request - by El Forum - 08-25-2008, 10:40 AM
Ajax Request - by El Forum - 08-25-2008, 10:41 AM
Ajax Request - by El Forum - 08-26-2008, 08:44 AM
Ajax Request - by El Forum - 08-26-2008, 08:51 AM
Ajax Request - by El Forum - 08-26-2008, 08:52 AM
Ajax Request - by El Forum - 08-26-2008, 09:03 AM
Ajax Request - by El Forum - 08-26-2008, 09:04 AM
Ajax Request - by El Forum - 08-26-2008, 09:07 AM
Ajax Request - by El Forum - 08-26-2008, 09:51 AM
Ajax Request - by El Forum - 08-26-2008, 09:55 AM
Ajax Request - by El Forum - 08-26-2008, 10:01 AM
Ajax Request - by El Forum - 08-26-2008, 10:05 AM
Ajax Request - by El Forum - 08-26-2008, 11:35 AM
Ajax Request - by El Forum - 08-26-2008, 11:40 AM
Ajax Request - by El Forum - 08-26-2008, 11:44 AM
Ajax Request - by El Forum - 08-26-2008, 11:50 AM
Ajax Request - by El Forum - 08-26-2008, 01:50 PM
Ajax Request - by El Forum - 08-27-2008, 08:30 AM
Ajax Request - by El Forum - 08-27-2008, 11:27 AM
Ajax Request - by El Forum - 08-27-2008, 11:32 AM
Ajax Request - by El Forum - 08-28-2008, 10:31 AM
Ajax Request - by El Forum - 08-28-2008, 10:34 AM
Ajax Request - by El Forum - 08-29-2008, 10:44 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.