XML
  Home arrow XML arrow Widget Walkthrough
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Download TestComplete 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Web Buyers Guide
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
XML

Widget Walkthrough
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 2
    2006-08-21

    Table of Contents:
  • Widget Walkthrough
  • Getting the headlines
  • Using loops
  • Fine tuning headline retrieval
  • Publishing your widget

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    TestComplete™ automates software testing for a fraction of what the big guys charge. Easy functional and load testing for all Windows, .NET, Java and Web apps. Download a free trial now.

    Widget Walkthrough
    (Page 1 of 5 )

    The first half of this tutorial introduced you to making a rudimentary but functional widget of the sort you can find on Yahoo's site since its purchase of Konfabulator. In this article, you'll add the finishing touches to increase its functionality.

    Widget Walkthrough 

    The preferences that you created in the first part of this article won't actually do anything on their own; they'll need the following JavaScript in order to actually make the required changes:

    <action trigger="onLoad">
    <![CDATA[
        function updatepreferences() {
          datatextarea.font = preferences.textfontpref.value;
          datatextarea.color = preferences.textcolorpref.value;
          datatextarea.size = preferences.textsizepref.value;
          datatextarea.style = preferences.textstylepref.value;
        }
        updatepreferences();
    ]]>
    </action>
    <action trigger ="onPreferencesChanged">
        updatepreferences();
    </action>

    As you can see, each action (onLoad and onPreferencesChanged) is contained within its own <action> element.  All each line of the updatepreferences() function is doing is setting the attributes of the textarea element, much as CSS would with HTML.  I've included the opening CDATA tag as we'll need it for one of the next functions.

    More XML Articles
    More By Dan Wellman


       · Hi, hope you enjoy finishing off the example widget and that you are inspired to...
     

    XML ARTICLES

    - Path, Predicates, and XQuery
    - Using Predicates with XQuery
    - Navigating Input Documents Using Paths
    - XML Basics
    - Introduction to XPath
    - Simple Web Syndication with RSS 2.0
    - Java UI Design with an IDE
    - UI Design with Java and XML Toolkits
    - Displaying ADO Retrieved Data with XML Islan...
    - Widget Walkthrough
    - Introduction to Widgets
    - The Why and How of XML Data Islands
    - Creating an XUL App Installer
    - Overlays in XUL
    - Skinning Your Custom XUL Applications






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway