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 5997591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:17:08+00:00 2026-05-23T00:17:08+00:00

I try to load a component via AJAX in Symfony context. I have created

  • 0

I try to load a component via AJAX in Symfony context.

I have created my link in my view:

<?php
    echo jq_link_to_remote('Compétences', array(
        'update'   => 'right_column',
        'url'      => 'personnage/loadCompetences',
        'position' => 'top',
    ));
?>

The action called:

public function executeLoadCompetences(sfWebRequest $request){
    if ($request->isXmlHttpRequest())
         $this->renderComponent("personnage", "competences");   
}

And the component (controller + view _competence.php)

public function executeCompetences(sfWebRequest $request){
        $personnage = $this->getUser()->getGuardUser()->Personnage;
        
        $this->lecture = $personnage->getCom_lecture();
        $this->ecriture = $personnage->getCom_ecriture();
        $this->armes = $personnage->getCom_armes();
        $this->bouclier = $personnage->getCom_bouclier();
        $this->diplomatie = $personnage->getCom_diplomatie();
        $this->commandement = $personnage->getCom_commandement();
        $this->meditation = $personnage->getCom_meditation();
        $this->embuscade = $personnage->getCom_embuscade();
        $this->herboristerie = $personnage->getCom_herboristerie();
        $this->espionnage = $personnage->getCom_espionnage();
}


<div id="subpanel">
    <ul id="competences">
        <li class="competence">
            <span>Lecture</span>
            <img alt="" src="/medieval-ages-v2/web/images/competences/competences_<?php echo $lecture ?>.png" />
        </li>
    ...
    </ul>
</div>

But I can’t load component if I don’t define a loadCompetenceSuccess.php (which includes the component).

Is there a way to load a component without create a xxxSuccess.php view?

  • 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-05-23T00:17:09+00:00Added an answer on May 23, 2026 at 12:17 am

    You’re missing a return in your action’s code:

    return $this->renderComponent("personnage", "competences");
    

    Unless you return something, symfony assumes “Success”, that’s why it’s looking for actionnameSuccess.php by default.

    Also: instead of hardcoding image paths like that, have a look at the image_path and image_tag helpers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

it's my first question. I have built a custom component: a RelativeLayout with a
My setup is: Windows Vista clisp 2.49 I run clisp and load asdf without
If I use Application.LoadComponent() to load a UserControl, Page or Window, my application freezes
I am using Spring framework (2.5.4) in my app with Load time weaving and
Hi I try set default value for comboBox. XAML: <ComboBox Name=StatusCombo Style={StaticResource statusComboStyle} SelectedValuePath=StatusMsg
I have this simple class: public class LuceneUtil{ private final EntityManager entityManager; public LuceneUtil()
After searching online this is a question I have been unable to find an
I'm working on a simple JavaScript game using HTML5 canvas. It's a very typical
I'm having some problems with defining a binding bean for my rich:dataTable. The contents
I'm making a program that allows you to add any class file that extends

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.