[Seaside] javascript challenge

SainTiss saintiss at gmx.net
Wed Jul 9 13:08:57 UTC 2008


Thanks Sebastian,

In my current scenario, however, I think ifthen would be fine, without the 
else. Could you give me a hint on how an ifthen can be achieved?

Thanks,

Hans

On Wednesday 09 July 2008 14:59:33 Sebastian Sastre wrote:
> Seaside has implemented the ifthen in a way it do not have else.
> I've made an extension (SUExtensions) to be able to use if:then:else: and
> other javascript. I can tell you is possible. Is kind of funny but it is
> possible and convenient for UI behavior which changes dynamically.
> If you want to try them you will find SUExtensions with that an other
> conveniences at jQuery project in squeaksource.com
>
> 	cheers,
>
> Sebastian Sastre
>
> > -----Mensaje original-----
> > De: seaside-bounces at lists.squeakfoundation.org
> > [mailto:seaside-bounces at lists.squeakfoundation.org] En nombre
> > de SainTiss
> > Enviado el: Miercoles, 09 de Julio de 2008 04:53
> > Para: seaside at lists.squeakfoundation.org
> > Asunto: [Seaside] javascript challenge
> >
> > Hi all,
> >
> > I've got the following scenario:
> >
> > - There's a div with some text (D1)
> > - onMouseOver D1 I want to show another div (D2) which is
> > hidden by default
> > - onMouseOut D1 I want to hide D2 after 2 secs, but ONLY if
> > at that moment the
> > mouse is not over D2.
> >
> > If I would do this in plain javascript, I'd probably set a
> > flag onMouseOver
> > D2, and unset it onMouseOut D2. I'd use this flag in a
> > function which is
> > called onMouseOut D1, to check whether the mouse is over D2.
> >
> > Now the question is how to do this in Seaside?
> >
> > I found out that creating javascript code in an onMouseOut
> > event handler can
> > be done with
> >
> > html div onMouseOut: (html javascript element id: 'D2'; hide)
> >
> > Calling a function is easy:
> >
> > <script> call: 'funname'
> >
> > The timeout stuff is supported as well by the "timeout:
> > delay" message.
> >
> > However, I couldn't find out how to add an if-then-else, nor
> > how to set a
> > javascript variable which I can use as a flag.
> >
> > Is it possible to do this the seaside way? Am I making this
> > too difficult? Do
> > I just need to use "html script" and use a plain javascript string?
> >
> > Thanks,
> >
> > Hans
> >
> > --
> > A liberal is a person whose interests aren't at stake at the moment
> >   -- Willis Player
> >
> > Hans Schippers
> > Research Assistant of the Research Foundation - Flanders (FWO
> > - Vlaanderen)
> > http://www.win.ua.ac.be/~hschipp/
> > Formal Techniques in Software Engineering (FoTS)
> > University of Antwerp
> > Middelheimlaan 1
> > 2020 Antwerpen - Belgium
> > Phone: +32 3 265 37 88
> > Fax: +32 3 265 37 77
> > _______________________________________________
> > seaside mailing list
> > seaside at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



-- 
A liberal is a person whose interests aren't at stake at the moment
  -- Willis Player

Hans Schippers
Research Assistant of the Research Foundation - Flanders (FWO - Vlaanderen)
http://www.win.ua.ac.be/~hschipp/
Formal Techniques in Software Engineering (FoTS)
University of Antwerp
Middelheimlaan 1
2020 Antwerpen - Belgium
Phone: +32 3 265 37 88
Fax: +32 3 265 37 77


More information about the seaside mailing list