September 21, 2007
@ 12:21 PM

A number of blogs incorporate scrolling blocks of text in their blog posts. This helps keep things organized and neat in the post.

The last time I needed to do this I used JavaScript, but since a lot of users turn scripting off for security reasons, I looked around and found a way to do it with good old CSS.

<div style="overflow:auto; height: 200px; width: 300px;>
<p>Some text to scroll around with.</p>
</div>

See it in action below:

 

Public Function GetClosedCount() As Long

 
        Dim oInboxAgenda As WFXTENDERLib.WfxAgenda
 
        Try
            ' Navigate to the Inbox for the Initial Routing Workflow user
            oInboxAgenda = oWFXConnection.Agenda(WORKBOX_TYPE_CLOSED)
            'Clear previous filters
            oInboxAgenda.SetFilter("", "", "")
            oInboxAgenda.SetFilter("Business Process", "=", "Initial Routing Workflow")
            'Refresh data so filter is applied
            oInboxAgenda.Refresh()
 
            Return oInboxAgenda.Count
        Catch eX As System.Exception
            MsgBox(eX.ToString)
        Finally
            System.Runtime.InteropServices.Marshal.ReleaseComObject(oInboxAgenda)
            oInboxAgenda = Nothing
        End Try
 
    End Function

 

So in a nutshell, a simple DIV and some CSS goes a long way. An added benefit is that this simple tag is supported on almost every browser.

I am still trying to figure out other ways to do this, I would prefer not having to hack the html view of my posts each time. But this works for now.

Cheers,

Robert Porter