Scriptaculous usage questions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Scriptaculous usage questions

Cees De Groot
Hi,

I have a little problem I would ideally like to solve without writing
a single line of Javascript, but I wonder whether that's possible at
the moment.

I have a form that needs to do two things:
- When a field changes, post an identifier, the field name, and the
value (using XMLHttpRequest).
- For any given form, an update loop that, via XMLHttpRequest, post an
identifier and reads back field name and value. This request may not
return immediately.
Together, with some "magic" inside the appserver, this would result in
keeping two copies of the same form synchronized. The server blocks
the request from the update loop, and continues that request as soon
as the other copy of the form posts a change. The identifier
identifies a 'synchronization session', e.g. two people looking at the
same data.

(background: we want a callcenter agent to help a customer with
filling in forms).

Now, this is easy to whip up with HV2 and plain Javascript using any
run-of-the-mill XMLHttpRequest wrapper. I just wonder how this would
be done cleanly inside Seaside, using Scriptaculous, and avoiding
handcoded Javascript larding my Smalltalk code :-).

(one issue I already encountered is that Seaside sessions serialize
requests - so the blocking update poll request blocks out anything
else in that session, meaning that this thing needs to run in its own
session, probably).

TIA,

Cees
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Scriptaculous usage questions

Julian Fitzell
Cees De Groot wrote:
> (one issue I already encountered is that Seaside sessions serialize
> requests - so the blocking update poll request blocks out anything
> else in that session, meaning that this thing needs to run in its own
> session, probably).

I'd think you'd want them in different seaside sessions anyway.  The
call centre employee might have different menu options, etc.  They might
be in an app that just keeps taking them to the next person who needs
help and thus going "back" might be somewhere completely different from
where the website user's "back" is.  It didn't sound like you wanted the
call centre employee to enter the user's session, just to have a form on
one of their pages linked to a form on one of he user's...  best not to
confuse that with a session, I'd say.

Can't help you with the JS as I haven't had a chance to do much
scriptaculous stuff yet...  just need to find an excuse to work it into
something at work... :)

Julian
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Scriptaculous usage questions

Cees De Groot
On 1/17/06, Julian Fitzell <[hidden email]> wrote:
> I'd think you'd want them in different seaside sessions anyway.

If you mean the user and the cc agent - of course. However, async
callbacks are done in the same session as the main page. And that
doesn't work if one of the callbacks just lingers on a semaphore or
something...

> Can't help you with the JS as I haven't had a chance to do much
> scriptaculous stuff yet...  just need to find an excuse to work it into
> something at work... :)
>
Heh. I just found that excuse :)
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Scriptaculous usage questions

Julian Fitzell
Cees De Groot wrote:
> On 1/17/06, Julian Fitzell <[hidden email]> wrote:
>
>>I'd think you'd want them in different seaside sessions anyway.
>
>
> If you mean the user and the cc agent - of course. However, async
> callbacks are done in the same session as the main page. And that
> doesn't work if one of the callbacks just lingers on a semaphore or
> something...

Ah, yes, sorry... I misunderstood what you were saying.

Julian
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Scriptaculous usage questions

Avi  Bryant
In reply to this post by Cees De Groot

On Jan 17, 2006, at 6:03 AM, Cees De Groot wrote:

> Hi,
>
> I have a little problem I would ideally like to solve without writing
> a single line of Javascript, but I wonder whether that's possible at
> the moment.
>
> I have a form that needs to do two things:
> - When a field changes, post an identifier, the field name, and the
> value (using XMLHttpRequest).
> - For any given form, an update loop that, via XMLHttpRequest, post an
> identifier and reads back field name and value. This request may not
> return immediately.
> Together, with some "magic" inside the appserver, this would result in
> keeping two copies of the same form synchronized. The server blocks
> the request from the update loop, and continues that request as soon
> as the other copy of the form posts a change. The identifier
> identifies a 'synchronization session', e.g. two people looking at the
> same data.

So did you ever get something working for this?  Inquiring minds want  
to know.

Avi
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside