Hi Peter,

My tests confirmed the following:

1) the need to refresh all behavior after updating DOM.
Lets say you have some behavior on table and you add new rows. Those
rows will not
inherit the events and behavior already attached on table.

2)inline events on added DOM elm will not fire in IE.
onclick little redemption could be <a href="javascript:
myClickFunction();">

3)if there is a space after eval before the CDATA like this "<eval> <!
[CDATA[.."  OP and FF will bail out and do nothing.

The solution:
Keep some init/refresh functions on the page from where you calling
the AJAX.
e.g. :

        <append select="#table-1 tbody">
                        <tr>...</tr>
        </append>
       <eval>updateTable();</eval>

Jan.

On Apr 17, 8:12 pm, lvp1138 <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> Due to the problem with IE unable to "rebind" onclick events, I am now
> binding click events viaTaconite'sEVAL command.
>
> All I want to do is, when the user clicks on the "submit" button, a
> "loading" animation to appear. Before going any further, please be
> aware that the way our app is designed, this is the only way to do it.
>
> So the submit INPUT is similar to:
>
> <input id="myinput" type="submit" onclick="$('#anim').show('fast')>
>
> Works fine. When the form is submitted, and the form is re-inserted
> (ReplaceContent) byTaconite, the following EVAL is done after the re-
> insertion:
>
>         <eval>
>                 $('#myinput').click(function()
>                         {
>                                 $('#anim').show('fast')
>                                 return false;
>                         }
>                 );
>         </eval>
>
> If I click again on the submit button, for some reason, the animation
> doesn't show up. The form gets submitted fine though.
>
> To make sure it worked, I put an image with ID "imagetest" and put the
> eval:
>
>         <eval>
>                 $('#imagetest').click(function()
>                         {
>                                 $('#anim').show('fast')
>                                 return false;
>                         }
>                 );
>         </eval>
>
> When I click the image, the animation shows up. That always works fine
> so the eval code is correct.
>
> The EVALs are not necessary with Firefox, since Firefox seems to re-
> bind the onclick events called through AJAX. And it works fine 100% of
> the time in Firefox, with just the "onclick" on the input button. The
> animation always shows up, even if it's just for a second until the
> form gets submitted and re-inserted.
>
> This whole workaround is for IE.
>
> Any ideas? I also try with "submit" instead of "click". I'm assuming
> that the jquery is not getting executed because the form is being
> submitted. But why does it work always with just the "onclick" in the
> input button?
>
> I'd greatly appreciate some feedback.
>
> Peter :)

Reply via email to