Figures
© 2004 Microsoft Corporation. All rights reserved.
Figure 1 SQL Query and Output

The Query
SELECT TOP 100 PERCENT dbo.Keywords.Keyword, dbo.Topics.TopicUrl
FROM  dbo.Keywords INNER JOIN
               dbo.RelatedTopics ON dbo.Keywords.KeywordID = 
dbo.RelatedTopics.KeywordID INNER JOIN
               dbo.Topics ON dbo.RelatedTopics.TopicID = 
dbo.Topics.TopicID
ORDER BY dbo.Keywords.Keyword, dbo.Topics.TopicUrl FOR XML AUTO
The Output
<dbo.Keywords Keyword="FloatPlane" KeywordID="1">
    <dbo.Topics TopicUrl="http://www.cs-ent.com" TopicID="3"/>
    <dbo.Topics TopicUrl="http://www.seaplane.org" TopicID="2"/>
</dbo.Keywords>
<dbo.Keywords Keyword="ForSale" KeywordID="2">
    <dbo.Topics TopicUrl="http://www.aso.com" TopicID="1"/>
    <dbo.Topics TopicUrl="http://www.cs-ent.com" TopicID="3"/>
</dbo.Keywords>
Figure 2 Disabling Checkboxes
<select id=district onChange='toggle_disable(this, 0, "state");'>
    <option selected>choice 1</option>
    <option>choice 2</option>
    <option>choice 3</option>
</select>

<select id=state onChange='toggle_disable(this, 0, "district");'>
    <option selected>choice 1</option>
    <option>choice 2</option>
    <option>choice 3</option>
</select>

<script language=jscript>
    function toggle_disable( object, toggle_index, disable_obj )
    {
        // test based on passed in index 
        if ( object.options[toggle_index].selected != true )
        {
            //disable object by dom id
            document.all.item(disable_obj).disabled = true;
        }
        else
        {    
            // enable object by dom id
            document.all.item(disable_obj).disabled = false;
        }    
    }
</script>
Figure 3 Setting the Onsubmit Handler
function captureSubmit() 
    { 
            var i; 
            for (i = 0; i<parent.testpage.document.forms.length;i++) 
            { 
                    parent.testpage.document.forms(i).onsubmit = 
                        captureSubmitSink; 
            } 
    } 
    
    function captureSubmitSink() 
    { 
            timeFormSubmit(this); 
    } 
Page view tracker