<div>if your problem is delay javascript, or start script after any amount of seconds try:<br></div><div>&lt;script&gt;</div><div>setTimeout( &#39;alertme();&#39; , 1500 );</div><div>function alertme () {</div><div>    alert(&#39; time is up! &#39;);</div>
<div>}</div><div>&lt;/script&gt;</div><div><br></div><div>--Hernan</div><div><br></div><div class="gmail_quote">On Tue, Mar 29, 2011 at 2:46 PM, Duncan Garland <span dir="ltr">&lt;<a href="mailto:Duncan.Garland@motortrak.com">Duncan.Garland@motortrak.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div lang="EN-GB" link="blue" vlink="purple"><div><p class="MsoNormal">Hi,</p><p class="MsoNormal"> </p><p class="MsoNormal">
We’ve been having some peculiar behaviour from our system. I think it’s because the controller which produces the HTML page stores data in the session for retrieval by the controller which produces the associated javascript file.</p>
<p class="MsoNormal"> </p><p class="MsoNormal">The client begins processing the HTML page as soon as it starts to arrive. When it reaches the script tag it requests the javascript page. Occasionally the first controller hasn’t written the session to the database when the javascript controller tries to retrieve it. (Catalyst::Plugin::Session::Store::DBIC).</p>
<p class="MsoNormal"> </p><p class="MsoNormal">I can move the script tag down the page a bit, but what I really need is a way to force the session to be written before the HTML template is rendered.</p><p class="MsoNormal">
 </p><p class="MsoNormal">Something like:</p><p class="MsoNormal"> </p><p class="MsoNormal">$c-&gt;session-&gt;{javascript}-&gt;{$template}  = { one = 1, two =&gt; 2};</p><p class="MsoNormal">$c-&gt;session-&gt;save;</p><p class="MsoNormal">
 </p><p class="MsoNormal">Is there such a method?</p><p class="MsoNormal"> </p><p class="MsoNormal">Regards</p><p class="MsoNormal"> </p><font color="#888888"><p class="MsoNormal">Duncan</p></font></div></div><br>_______________________________________________<br>

List: <a href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a><br>
Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>
Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>
Dev site: <a href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a><br>
<br></blockquote></div><br>