Tags:
ajax1Add my vote for this tag create new tag
, view all tags

AJAX Framework Showcase

TWikiAjaxFramework examples.

Code on this page

<script type="text/javascript">
// <![CDATA[
var TWiki = {}; // should be in twiki.js
// ]]>
</script>
<script type="text/javascript" src="%PUBURL%/Codev/TWikiAjaxFramework/yahoo.js"></script>
<script type="text/javascript" src="%PUBURL%/Codev/TWikiAjaxFramework/connection.js"></script>
<script type="text/javascript" src="%PUBURL%/Codev/TWikiAjaxFramework/twiki_html.js"></script>
<script type="text/javascript" src="%PUBURL%/Codev/TWikiAjaxFramework/twiki_request.js"></script>
<script type="text/javascript" src="%PUBURL%/Codev/TWikiAjaxFramework/behaviour.js"></script>
<script type="text/javascript">
// <![CDATA[
   TWiki.Request.indicatorHtml = "<img src='%PUBURL%/Codev/TWikiAjaxFramework/indicator.gif' alt='' />";
   var toolsTopic = "TWikiAjaxFrameworkShowcaseTools";
   var toolsTopicUrl = "%SCRIPTURL{view}%/Codev/" + toolsTopic;
   var myrules = {
      '#expandWebBtn' : function(el) {
         el.onclick = function() {
            TWiki.Request.updateElementWithId("weblist", "expandedWebs", toolsTopicUrl + "?skin=text;section=weblist");
            return false;
         }
      }
   };
   Behaviour.register(myrules);
// ]]>
</script>

Web list

I've stealed this idea straigt from MiniAhah, albeit simpler in this example: no toggle back.

Code:
TWiki.Request.draw("weblist", "expandedWebs", "%SCRIPTURL{view}%/Codev/TWikiAjaxFrameworkShowcaseTools?skin=text;section=weblist");

Generates:
toggleopen TWiki

Note: TWiki currently does not accept the url param section to pass to the view script.

Discussion

Strange. It seems I cannot pass the url parameter section here on twiki.org.

-- ArthurClemens - 31 May 2006

 
Topic revision: r9 - 25 Jul 2006 - 23:43:05 - ArthurClemens
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback