You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Freek Segers <fr...@nerocmediaware.nl> on 2005/12/19 10:50:18 UTC

Ajax client library handling script tags

Hi,

I'm having a problem with the way Ajax handles script tags in the  
browser update XML.
The way it is implemented in Cocoon 2.1.8 the scripts are evaluated  
before the HTML elements are replaced.
Because my script calls document.getElementById() my script acts on  
the old element, that is replaced later on.
Wouldn't it be better to evaluate the scripts after the element has  
been replaced?

Freek Segers


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Ajax client library handling script tags

Posted by Antonio Gallardo <ag...@agssa.net>.
Freek Segers wrote:

> Thanks for the quick response.
> I already made a fix so I could keep working. Do you want we to  
> submit this somewhere?

Please. Add it to jira [1]

Best Regards,

Antonio Gallardo.

[1] http://issues.apache.org/jira/secure/CreateIssue!default.jspa

Re: Ajax client library handling script tags

Posted by Freek Segers <fr...@nerocmediaware.nl>.
Thanks for the quick response.
I already made a fix so I could keep working. Do you want we to  
submit this somewhere?

Freek

On 19-dec-2005, at 13:38, Sylvain Wallez wrote:

> Freek Segers wrote:
>> Hi,
>>
>> I'm having a problem with the way Ajax handles script tags in the  
>> browser update XML.
>> The way it is implemented in Cocoon 2.1.8 the scripts are  
>> evaluated before the HTML elements are replaced.
>> Because my script calls document.getElementById() my script acts  
>> on the old element, that is replaced later on.
>> Wouldn't it be better to evaluate the scripts after the element  
>> has been replaced?
>
> Yep. You're right. I'll change this.
>
> Sylvain
>
> -- 
> Sylvain Wallez                        Anyware Technologies
> http://bluxte.net                     http://www.anyware-tech.com
> Apache Software Foundation Member     Research & Technology Director


Re: Ajax client library handling script tags

Posted by Sylvain Wallez <sy...@apache.org>.
Freek Segers wrote:
> Hi,
>
> I'm having a problem with the way Ajax handles script tags in the 
> browser update XML.
> The way it is implemented in Cocoon 2.1.8 the scripts are evaluated 
> before the HTML elements are replaced.
> Because my script calls document.getElementById() my script acts on 
> the old element, that is replaced later on.
> Wouldn't it be better to evaluate the scripts after the element has 
> been replaced?

Yep. You're right. I'll change this.

Sylvain

-- 
Sylvain Wallez                        Anyware Technologies
http://bluxte.net                     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director