New Extension by Tom Muck
Tom Muck has developed another cool extension for Dreamweaver UltraDev: Sort Repeat Region. Normally, when you apply a repeat region to a table row, there is no easy way to sort the results according to the column heading. This server behavior can be applied to a table that has a repeat region on it. The server behavior will automatically create all the code necessary to have clickable links in place of the column headings that will order the recordset by that column. Another click will order in descending order.
The interface looks like this:
Tom also made a demo page to show you what can be done with the extension.
The extension is available for $29.99 US, but the price is a bargain when you have a look at the time that you will save by using it.
You can buy the Sort Repeat Region Extension at http://www.tom-muck.com/extensions/help/sortrepeatregion/
Comments
You don't need this extension!
Sorry, I'm all for someone making a dollar, but come on this is not worth $19. Anyone can do this code themselves.
1) After you've set up the tables and are getting the recordsets you want. Put this code before connecting to the database:
<%
'put this code in, and change where needed
if request.querystring("sortby") = "area_id" then
sortby = "area_id"
elseif request.querystring("sortby") = "ID" then
sortby = "ID"
elseif request.querystring("sortby") = "email" then
sortby = "email"
else
sortby = "ID"
end if
'Below is something simular to what you ahould have already add '& sortby' at the end of the select statement
set rsYOURRECORDSET = Server.CreateObject("ADODB.Recordset")
rsYOURRECORDSET.ActiveConnection = MM_db_STRING
rsYOURRECORDSET.Source = "SELECT area_id, email, ID FROM area ORDER BY " & sortby
rsYOURRECORDSET.CursorType = 0
rsYOURRECORDSET.CursorLocation = 2
rsYOURRECORDSET.LockType = 3
rsYOURRECORDSET.Open()
rsYOURRECORDSET_numRows = 0
%>
2) now wrap your table headings with this code
<td><A HREF="nameofyourfile.asp?sortby=area_id">Area ID</a></td>
This is all you need to do to sort your tables. I'm still learning and adding functionality to this as well. I'm just pissed these guys think people are that stupid. I'm willing to pay money for stuff, but this is too easy for someone to make a buck on!!
RE: You don't need this extension!
Some people just don't seem to understand what it's all about.
RE: RE: You don't need this extension!
As I said, my solution is far from complete, but I have $19 still in my pocket, and I'm learning how to do my own code and not use UD.
RE: RE: RE: You don't need this extension!
If you're learning how to do all your own code, then what are you griping about?
Oh, and one other thing.... can you do this same 'simple' action in JSP, CFML or PHP too? Because this extension can.
But let's put all this into perspective shall we. You're still learning, and that's fine. Exactly how long did it take you to get proficient enough to do that code? A few weeks? A few days? A few hours?
If we're talking real life here, and it seems to me that's what you are doing, if you're so keen to save the money. How much would it have cost you to actually work out how to write that routine?
All extensions can be broken down in this way. There's nothing really new about the functionality. But given that you don't have to pay the development cost, the debugging costs, or the testing costs (and if you do this as a hobby, then it does still cost despite what you might think). How long would you have had to work to spend $19?
Dreamweaver and UltraDev extensions are all about time saving. If you have the time to spend, then that's fine, there really is no need for you to buy the extension. However, if you're on a tight budget, or time is tight, or you're going to use this code more than once then you really aren't going to get a more cost-effective solution.
You must me logged in to write a comment.