Re: [OT] Ajax - generic "processStateChange"

2005-06-23 Thread Marc Demlenne
Thank you Jeff, your solution is exactly what i was looking for. Now i'd have another question, still slightly off-topic in a struts-list, but is there an ajax list ? In order to keep compatibility for all users, including those who don't enable JavaScript, I need to have a solution where ajax u

Re: [OT] Ajax - generic "processStateChange"

2005-06-21 Thread Jeff Beal
Event handlers have to be functions. When you write 'onreadystatechange = processStateChange(spanID);', the processStateChange() function is *immediately* executed, and the returned value is assigned to the event handler. This works great if your processStateChange returns a function, but if it r

Re: [OT] Ajax - generic "processStateChange"

2005-06-21 Thread Frank W. Zammetti
No, you cannot pass a paremter the way you are trying... req.onreadystatechange registers an event handler with the XMLHttpRequest object, and it just takes a reference to a function. The way to handle this is to set the span ID in a page-scope variable that your state change handler will refe

[OT] Ajax - generic "processStateChange"

2005-06-21 Thread Marc Demlenne
Hi all, Using Ajax (with Struts, but it's not really a struts issue), is it possible to use the function called "processStateChange" by Franck with an argument ? I would like to have one function beeing able to be used more times in a page, updating different span zones according to the control