With DISC Enabled, Portlet Maximize Removes All JavaScript-Created Content
667518Nov 17 2008 — edited Nov 17 2008Hello -
I've seen this problem described in a few other threads without solution, and I thought that a rephrasing might help drive to an answer.
When a Desktop has DISC enabled, the portlet's maximize/minimize buttons become JavaScript buttons that rewrite the DOM rather than simply redirecting the user to the .portlet file as they do when DISC is not enabled.
If your portlet uses JavaScript to render any output, that output is lost when the portlet is maximized/minimized with DISC enabled.
Even simple JavaScript output like this:
<script type="text/javascript">
document.write("<br/>Hello, world!");
</script>
Disappears when the portlet is maximized/minimized.
I have one portlet in particular that has hundreds of lines of JavaScript that goes completely blank when it is maximized.
Other than rewriting the entire portlet to use DISC, which isn't really an option, how can I instruct the portal to re-run all the JavaScript for a given portlet when it moves it around via DOM manipulation? Also, how can I detect that the portlet has just been maximized, so I can re-scale the JavaScript output?
Thanks,
Tim