Personal tools

Views

Dreamweaver Widget Packager:Working WDF

From Adobe Labs

<widget name="Change Colors" version="1.0" xmlns:dw="http://ns.adobe.com/dreamweaver/" id="com.diamondr/widgets/changeColors">

 <authors>
   <author name="Diamond Richards"/>
 </authors>
 <javascript location="afterContent">
   <![CDATA[
     function changeColor()
     {
     if (document.getElementById('@@id@@').style.backgroundColor == 'green')
     document.getElementById('@@id@@').style.backgroundColor = 'red';
     else
     document.getElementById('@@id@@').style.backgroundColor = 'green';
     }
     ]]>
 </javascript>
 <content>
   <![CDATA[<div style="background-color: green;" id="@@id@@" onclick="changeColor()">Click to Change Color</div>]]>
 </content>
 <icons/>
 <requires/>
 <categories>
   <category name="Web Widgets"/>
 </categories>
 <description>
   <![CDATA[Click to change div tag color from green to red.]]>
 </description>

</widget>

Retrieved from "http://labs.adobe.com/wiki/index.php/Dreamweaver_Widget_Packager:Working_WDF"