Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7914273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:03:55+00:00 2026-06-03T14:03:55+00:00

I try to create an Ajax search with CakePHP using the JsHelper. The Ajax

  • 0

I try to create an Ajax search with CakePHP using the JsHelper. The Ajax request triggers but it never returns values:

Search form (find_entries.ctp):

<?php echo $this->Form->create('Entry');?>
<?php echo $this->Form->input('title', array('div' => false, 'empty', 'label' => false, 'placeholder' => 'Search'));?>

<?php echo $this->Js->submit('Upload', array(
    'before'=>$this->Js->get('#checking')->effect('fadeIn'),
    'success'=>$this->Js->get('#checking')->effect('fadeOut'),
    'update'=>'#choose_options')
    )
;?> 
<?php echo $this->Form->end();?>

Controller:

public function find_entries(){
    if(!empty($this->request->data)){

            $entries = $this->Entry->find('all', array('conditions' => array('Entry.title' => $this->request->data['Entry']['title);    
    $this->set('entries', $entries);
    if($this->RequestHandler->isAjax()){
    $this->render('entries', 'ajax');   
    }
    }

}

Partial to render (entries.ctp)

<div id="entries">

<?php foreach ($entries as $entry) :?>

    <?php echo $entry['Entry']['title']; ?>

<?php endforeach ;?>

What goes wrong here? thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T14:03:56+00:00Added an answer on June 3, 2026 at 2:03 pm

    have you created any div tag with id choose_options to render the ajax result? If not create a div tag like this in the view file.

    <div id="choose_options"></div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to create a very simple app using windows API. I've done some
I try to create a form that can save a person's form data so
I try to create unit test cases to check my table values are correct
Currently users can search a database using php and ajax with the results shown
I am trying to create a dynamic UI using UpdatePanel of AJAX toolkit. Let
Hi I'm trying to create a simple registration form with ajax validation. I've got
I using jquery datatable plugin and having a Create button for ajax creation of
I'm trying to create a basic submit form (like the dajaxice's example) but i
An ajax request returns me a standard JSON array filled with my user's inputs.
I try to create a date range by using the jQuery UI datepicker, using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.