I have an ajax form that is submitting new content to the bottom of a
div. What I want to try and do is get an 'appear' effect to happen on
the new content once it's submitted. I can't get this effect to work.
I can't find any good resources on this and I can't find any old posts
in this group that address this. Here is my code:

<?
echo $ajax->div('bills');
foreach( $bills as $bill )
{
    print "<div id='bill'";
    if(isset($insertId)) print " style='display:none'";
    print ">{$bill['Bill']['name']}</div>";
}

{I have tried to add the effect here with js}

echo $ajax->divEnd('bills');
?>

<? echo $ajax->form('addBill', 'post', array(
    'model' => 'Bill',
    'url' => array('controller' => 'bills', 'action' => 'add'),
    'update' => 'bills',
    'position' => 'bottom',
    'after' => 'document.getElementById(\'BillName\').value=\'\';')); ?
>

{I have tried the effect here in the 'complete' option of the form
call }

<input name="data[Bill][name]" type="text" maxlength="100" value=""
id="BillName" />
<input type='submit' value='Submit'>
</form>

So basically if the insertId variable gets set in the add function, so
only new posts get the display:none, which seems to be needed for an
appear effect. I have tried putting the Effect.Appear('bill') in a
couple places and can't get it to work. Can somebody push me in the
right direction?

Thanks.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to