Author Login
Post Reply
Hi all,
onActivate() is called twice on my page when I have following Javascript
code included. When I remove document.write() call, onActivate() is called
once. Any idea how can I solve this?
Sample.tml
...
<head>
<script type="text/javascript"
src="${asset:context:/js/styleloader.js}"></script>
...
styleloader.js
function loadBrowserStyle()
{
... handling routines, where specialCSS is filled with proper style
(different style for different browsers)
document.open();
document.write("<link rel=stylesheet type='text/css'
href='"+specialCSS+"' title='externe Styles'>");
document.close();
}
loadBrowserStyle();
onActivate() is called twice even if I replace <link rel=... in
styleloader.js with something like this ...
"<link href=\"${asset:context:" + specialCSS + "}\" rel=\"stylesheet\"
type=\"text/css\" />"
Any idea how can I write to page from Javascript without calling
onActivate() twice?
Regards,
Robert
--
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)