Ajax

Hello,

I’m a newbie in Yii framework but I learned a lot of stuffs already. So let’s go to my question:

I did a project from scratch using the gii tool and everything is working perfect. I created my database and added only 2 fields, ID and NOTES. My project basically you log in with the admin pass and you are going to have a list of notes that you can create, manage, update. That’s working perfect but my doubt is:

I have my view and I’m loading all my notes title in the left side of my page in a list and what I want to do is when you click on this list it will open on the right side of the page the input to edit that title. So I don’t know if this is an ajax call or not.

What is doing now is redirecting to the update page but I don’t want that, I want basically is the content of the update page loading in the right page of the website.

I tried to renderpartial:

<?php echo $this->renderPartial(’_form’, array(‘model’=>$model)); ?>

but didn’t work.

Please help me!!!

PS: I’m sorry with my english but let me know if you understand.

I think you’re indeed searching for an Ajax solution (please look at our web-app for some examples: www.malvee.com/jobber). What you should try is creating a javascript / jquery function in your page that does ‘something’ when you click on that post as a simple first step. After that, you could try to incorporate the Ajax function (see JQuery library for more information) to do some request to your framework and do something with the response.

I hope that helps you a bit; took us a couple of weeks before understanding how and what.