how topass value to controller??
        Posted  
        
            by rajesh
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by rajesh
        
        
        
        Published on 2010-05-05T12:11:30Z
        Indexed on 
            2010/05/05
            12:18 UTC
        
        
        Read the original article
        Hit count: 290
        
hi all, actuallly when i trying to pass url value to controller action, action is not getting the required value... i ma sending the value like this
function value(url,id)
    {
   alert(url);
     document.getElementById('rating').innerHTML=id;
     var params = 'artist='+id;
  alert(params);
 // var newurl='http://localhost/songs_full/public/eslresult/ratesong/userid/1/id/27';
   var myAjax = new Ajax.Request(newurl,{method: 'post',parameters:params,onComplete: loadResponse});        
   //var myAjax = new Ajax.Request(url,{method:'POST',parameters:params,onComplete: load});
   //alert(myAjax);
    }
 function load(http) 
    {
       alert('success');
    }
and in controller i hav write like
public function ratesongAction()
        {
                   $user=$_POST['rating'];
                   echo $user;
    $post= $this->getRequest()->getPost();
    //echo $post;
   $ratesongid= $this->_getParam('id');
but still not getting the result i am using zend framework
© Stack Overflow or respective owner