Periodical and running a script

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

Periodical and running a script

squeakman
Hello,

I have a SUPeriodical set up as follows:

html
   script:
     ((html periodical)
        id: 'compositeGraph';
        frequency: 5 seconds;
        on: #renderNextImageOn: of: self)


What I want is to run some javascript when the periodical is triggered.
  For example, I would like the following javascript to be executed each
time the periodical is triggered:

html
  script: ('document.getElementById("testDiv").src="new text";').


I cannot figure our how to run the javascript code when the periodical
is triggered.

How do I do this?

Thanks,
Frank

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

Re: Periodical and running a script

Lukas Renggli
The code looks ok. Did you try with FireBug?

Lukas

2010/1/3 Squeaker <[hidden email]>:

> Hello,
>
> I have a SUPeriodical set up as follows:
>
> html
>  script:
>    ((html periodical)
>        id: 'compositeGraph';
>        frequency: 5 seconds;
>        on: #renderNextImageOn: of: self)
>
>
> What I want is to run some javascript when the periodical is triggered.  For
> example, I would like the following javascript to be executed each time the
> periodical is triggered:
>
> html
>  script: ('document.getElementById("testDiv").src="new text";').
>
>
> I cannot figure our how to run the javascript code when the periodical is
> triggered.
>
> How do I do this?
>
> Thanks,
> Frank
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>



--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Periodical and running a script

squeakman
Lukas Renggli wrote:
> The code looks ok. Did you try with FireBug?
>
> Lukas
>


Thanks for the tip, that was all it took.  I figured it out, I changed
the javascript to:

html script: ('document.getElementById("testDiv").innerHTML=" new stuff";')

and it worked like a charm.

Thanks again,
Frank

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