* CI = CodeIgniter, I presume

Steve,

I'm not sure I understand your question, but when you call:

$('#pendingUsers').load('index.php/meduser/check_pending_users');

It should load the HTML returned by index.php/meduser/check_pending_users
into whatever element has the id "pendingUsers" ... CI doesn't need to know
about the target DIV.  It just needs to return some HTML.

If you need to do something differently depending on the result of
check_pending_users, that becomes a little more complex.

Scott

On 8/13/07, Steve Finkelstein <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I have a simple javascript file being loaded externally that has the
> following code:
>
> -- snip --
>
> $(document).ready(function() {
>
> $('#pendingUsers').load('index.php/meduser/check_pending_users',false,
> function() {
> $('#pendingUsers a').click(function() {
> $.post('index.php/meduser/pull_user_information', {id:
> $(this).attr('rel')}
> );
> });
> });
>
> setInterval(function() {
> $('#pendingUsers').load('index.php/meduser/check_pending_users');
> }, 300000);
>
> // initially hide the main content div until a pending user is clicked.
>
> });
>
> -- snip --
>
> My issue here is I'm not sure how with CI to associate the $.post() with
> the div I want to populate the data back from the server with in a view. My
> view contains a <div id="main"></div> area where the results should be
> posted back.
>
> My controller looks like this:
>
> function pull_user_information()
> {
> $id = $this->input->post('id');
> $data['query'] = $this->db_users->query('select * from tbl_signups
> where ID="$id"'
> );
>
> $this->load->view('default/meduser_useraccordny_view', $data);
> }
>
> I'm trying to populate the rel of the anchor tag into $id and using that
> to query the database.
>
> I can then pass that into the meduser_useraccordny_view, however I'm still
> not entirely sure how to populate the particular div.
>
> Any assistance would be appreciated!
>



-- 
.|..
Scott Trudeau
scott.trudeau AT gmail DOT com
http://sstrudeau.com/
AIM: sodthestreets

Reply via email to