So, a few hours ago I posted about an odd JavaScript issue I was having where I couldn't set a field's disabled property. Turns out it was an issue with Spry, and one that makes sense if you think of it. My code was doing something like so:

if(offset == 0) $("prevbutton").disabled=true; else $("prevbutton").disabled=false;

if((offset + pageSize) >= numRows) $("nextbutton").disabled=true; else $("nextbutton").disabled=false;

Spry.Data.updateRegion("issues");

This code was run anytime you would click the Previous or Next buttons. It was a basic page handler for my dataset. The updateRegion call basically redrew the region. I had code inside it to check and see if a row should be displayed:

<tr spry:repeat="dsIssues" spry:even="adminList0" spry:odd="adminList1" spry:test="{ds_RowNumber} >= pageOffset && {ds_RowNumber} < pageStop">

The problem came up due to the fact that I had this inside the region:

<input type="button" id="prevbutton" value="Prev" onclick="UpdatePage(pageOffset - pageSize);" disabled="true">

I had the previous button disabled at first since, obviously, you start on the first page. However, when I ran the updateRegion command, Spry essentially "reloaded" my initial HTML, which means the disabled=true was also being rerun.

Obvious. But of course - most bugs are (after you fix them).