This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

ajax multiple update div

Social code snippet repository

ajax multiple update div

by jlopes » Sun Jan 20, 2008 9:14 pm

Here is the code to update multiple divĀ“s using ajax. :oops:

Hope U enjoy.
Attachments

[The extension txt has been deactivated and can no longer be displayed.]

jlopes
Junior Member
 
Posts: 2
Joined: Sun Jan 20, 2008 9:07 pm

Re: ajax multiple update div

by sysyem » Wed Aug 20, 2008 5:56 pm

Hello I have this problem, can you help me ?

I have a problem with the Ajax Indicator, I want to show it in div id=mark_xx, but i dont know how to do it. I tried this in _interested_user helper but the indicator.gif not appear there.

...
<div class="interested_mark" id="mark_<?php echo $question->getId() ?>">
<div id="indicator_<?php echo $question->getId() ?>" style="display: none"></div>
<?php echo $question->getInterestedUsers() ?>
</div>

<?php echo link_to_user_interested($sf_user, $question) ?>

and I put this in the helper function:
...
else
{
// didn't declare interest yet
$indicator = "'indicator_".$question->getId()."'";
return link_to_remote('interested?', array(
'url' => 'user/interested?id='.$question->getId(),
'update' => array ('success' => 'block_'.$question->getId()),
'loading' => "Element.show(".$indicator.")",
'complete' => "Element.hide(".$indicator.");".visual_effect('highlight', 'mark_'.$question->getId()),
));
}
...

any suggestion ?
sysyem
Junior Member
 
Posts: 2
Joined: Fri Aug 15, 2008 5:57 am