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 use is
usefull but not mandatory. Is there a some good practice to offer the
end-user a page that use AJAX if javascript is enabled, (with
supported-version), but fall back to a more classical way if not ?

Any help is welcome.


On 21/06/05, Jeff Beal <[EMAIL PROTECTED]> wrote:
> 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 returns (for
> example) an int, there are problems.
> 
> Use an anonymous JavaScript function for your event handler:
> 
> function retrieveURL(name, spanID) {
>   req.onreadystatechange = function() { processStateChange(spanID); };
> }
> 
> On 6/21/05, Marc Demlenne <[EMAIL PROTECTED]> wrote:
> 
> > I'd like to have smthg like
> > function retrieveURL(name, spanID) {
> >       ...
> >       req.onreadystatechange = processStateChange(spanID) ;
> >       ...
> > }
> >
> 


-- 
Marc Demlenne

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to