<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I have followed your thread which is quite interesting.<br>
I have successfully followed the advices Lukas provided.<br>
<blockquote
cite="mid67628d690707051203l54cb11a3p8e5ad1e2cbfc4415@mail.gmail.com"
type="cite">
<blockquote type="cite"><br>
It's so frustrating!!
<br>
</blockquote>
</blockquote>
It's so amazing when it works !!!<br>
<blockquote
cite="mid67628d690707051203l54cb11a3p8e5ad1e2cbfc4415@mail.gmail.com"
type="cite"><br>
I copy and pasted your example. I fixed it according to my previous
<br>
mail and it works. As a response you should only get:
<br>
<br>
<script
type="text/javascript">/*<![CDATA[*/periodical.stop()/*]]>*/</script>
<br>
<br>
Nothing else, especially no <head> and <body> tags.
<br>
<br>
</blockquote>
Indeed, no <head> and <body> tags in the response.<br>
But I had both of these tags due to the #evalScripts: not at the right
place.<br>
As Lukas suggested, I am on an older version of Scriptaculous and I
needed #evalScripts: set to true but on the OUTER updater.<br>
<br>
Here is the code:<br>
<br>
html div id: 'time'.<br>
(html submitButton)<br>
onClick: ((html periodical)<br>
id: 'time';<br>
<b><big>evalScripts: true;</big></b><br>
frequency: 1 second;<br>
assignTo: 'periodical';<br>
callback: <br>
[:r | <br>
(DateAndTime now -
(start ifNil: [start := DateAndTime now])) seconds > 10 "#sample
criteria#"<br>
ifTrue: <br>
[r script:
((r periodical)<br>
alias: 'periodical'; "evalScripts: true; should not be there according
to Lukas' advise"<br>
call: 'stop').<br>
start :=
nil]<br>
ifFalse: [r
render: DateAndTime now - start]]);<br>
text: 'Start'.<br>
<blockquote
cite="mid67628d690707051203l54cb11a3p8e5ad1e2cbfc4415@mail.gmail.com"
type="cite">Lukas
<br>
<br>
</blockquote>
Thank you Folks,<br>
Julien<br>
</body>
</html>