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

  • Home
  • SEARCH
  • 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 9184373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:01:55+00:00 2026-06-17T19:01:55+00:00

I am building an app in CakePHP and I have a jquery dialog window

  • 0

I am building an app in CakePHP and I have a jquery dialog window and every time the user opens it I want to perform a jquery request that will populate the content with the result of the request.
I have an js file that is in the webroot/js folder, with the following script:

$.ajax({                    
    url:'/projects/getAssets',
    type:"POST",                                        
    data:assetData,
    //dataType:'text',
    update: '#assetManagerContent'
});

In my controller file (ProjectsController) I have the following function:

function getAssets($id = null) {
    // Fill select form field after Ajax request.
    if(!empty($this->data)){
        $this->set('assetsFilter',
        $this->Project->Asset->find('list',
            array(
                'conditions' => array(
                    'Asset.project_id' => '23'
                )
            )
        )
    );
    $this->render('elements/assets', 'ajax');
    }
}

And finally I have the view (elements/assets):

<?php $assetsFilter = $this->requestAction('projects/getAssets'); ?>
  <?php foreach($assetsFilter as $assetFilter): ?>
    <div class="assetManager-asset">
        <div class="thumb"></div>
        <div class="label-name"><?php echo $assetFilter['AssetType']['type'] ?></div>
        <div class="label-date"><?php echo $assetFilter['Asset']['layer'] ?></div>
        <?php //echo $assetFilter['Asset']['id'] ?>
    </div>
   <?php endforeach; ?>

When the user opens the dialog the ajax request is triggered but nothing seems to happen in the #assetManagerContent div.

I hope someone can tell me what I am doing wrong

  • 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-17T19:01:56+00:00Added an answer on June 17, 2026 at 7:01 pm

    As far as I know, there is no update option in the jQuery ajax api. Instead, you should add the success callback and populate the data there:

    $.ajax({                    
        url:'/projects/getAssets',
        type:"POST",                                        
        data:assetData,
        //dataType:'text',
        success: function(data) {
          $('#assetManagerContent').html(data);
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im building an app that requires the user to login with and ID and
I am building an app that has a map feature and have search all
I am building an app with cakephp 1.3. I have a scenario where the
I am building a web app using CakePHP that will allow users to create
Im building an app that takes a photo of the user, its working fine
Im building an app that allows the user to record a video (in app)
I'm building an app in Rails 3. I currently have a user model which
Building an app using Phonegap and jquery on Android using this code to request
I'm currently building an app that generates quotes. The total time to generate all
I'm building an app that checks as site every 15 minutes for changes. I

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.