> $this->input->post('active')
Is "active" the right variable? Or did you use "article" like I put in
to my example?
This is a jQuery group meant for jQuery questions, so I'm trying to
help on the jQuery part, mainly.
Try using Firebug for Firefox to debug the AJAX request, and determine
whether the expected POST data is being sent or not. That should be
your first step.

On Oct 7, 1:18 pm, rosnovski <rosnov...@gmail.com> wrote:
> Hey thanks for the reply,
>
> the group lives!!!
>
> I did that and still nothing. I am using codeigniter and I would like
> to paste the code incase it sheds more light and maybe a solution?
> thanks here it is:
>
> MODEL-
> function displayby_name($name) { $this->db->select
> ("articletitle,articlebody,articleauthor"); $this->db->from
> ('articles'); $this->db->where('articletitle',$name); $Q = $this->db->get(); 
> if($Q->num_rows() > 0){ $text = $Q->result_array(); } echo
>
> $this->db->last_query(); return $text; }
>
> CONTROLLER-
> function readarticle() { $articlename = $this->input->post('active');
> $output = $this->articles->displayby_name($articlename);
>
>         if($output){
>                 $data['article'] = $output;
>         }
>         $this->load->view('loadarticle',$data);
>     }
> thanks for the help
>
> On Oct 7, 10:41 pm, rosnovski <rosnov...@gmail.com> wrote:
>
> > Hi y'all,
>
> > Please look at this code:
>
> > $('ul#navigation li ul li>a').click(function(){
> >         var active = $(this).text();
> >         $('#artcontent p').empty();
> >         $.ajax({
> >                 type: 'POST',
> >                 url: 'homepage/readarticle',
> >                 data: $(active).serialize(),
> >                 success: function(databack){
> >                    $('#artcontent').append(databack);
> >                    }
> >                 })
> >         });
>
> > I have a ul li a that are children of parent ul navigation and li.
> > what I am trying to do is to load an article page. This works but it
> > reads the database and loads all the articles in my database instead
> > of the one identified by active. I would like to know what I am doing
> > wrong or is there a better way to go about this?
>
>

Reply via email to