Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

 

Note:  Work in progress.  Information taken from http://jasig.275507.n4.nabble.com/data-ajax-returns-does-not-display-data-within-webproxy-portlet-td4355777.html.

...

If you are using Ajax to update the content of the web proxy portlet, you can use the WPP's ability to do pre/post static html to pull in any specific versions of jQuery or other javascript libraries so they are loaded only once to avoid memory leaks.  You can load in the specific library version in pre-processing and create a no-conflict reference, then in the post-procesing use a closure to make the reference ($ or whatever) available.  See JavaScript Best Practices for additional information.

Inline Javascript

There are problems with “inline” JavaScript, like below:

Code Block
languagejavascript
<script language="JavaScript">
  function helloWorld(){
    alert ("Hello from WebProxyPortlet!");
  }
</script> 

When this code is proxied, the WebProxyPortlet “engine”  adds an empty “src” attribute, so the first line looks like this: <script language=”JavaScript” src=””>.  As the result, Firefox and Chrome just ignore those JS functions. IE and Opera were just fine.  If you move the function into a separate JS file, things started to work as they are supposed to.