Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Dynamic to static

    Is there a way for me to take a table that is being built dynamically and have
    it be stored as static information in memory somehow so that I can sort it in
    anyway that I want. Due to various complications (read my other post to know
    more), after many many hours and dozens of attempts at getting the table to
    sort the way I want it to in the queries, I cannot. I basically want to store
    the information in the dynamic table that is being built so that I can sort by
    any of the columns that I would like. Any ideas would be appreciated.

    T McDizzle Guest

  2. Similar Questions and Discussions

    1. Dynamic and Static Site
      I have not used Dreamweaver before and now I am also trying to add dynamic pages to our site. I will be using ColdFusion to do this. The question...
    2. Static vs. Dynamic XML
      Hello all, I have been stumped on this one for over a year now. I have created a Flash Map that functions properly with a static XML file but...
    3. Converting Static to Dynamic -
      Hey Y'all, I just launched a new website a couple of days ago - http://www.v4honda.com It is the perfect example of why a site should be dynamic....
    4. Static vs. Dynamic
      What is the overall difference between static html and dynamic html?
    5. Dynamic and Static IP
      I was wondering if you can have dynamic and static IP addresses on the same network. The network will include PCs with Win98, W2K, and XP operating...
  3. #2

    Default Re: Dynamic to static

    Are you referring to a record set? If so, then you just assign the
    record set to a persistent scope such as session, application or server:
    session.myRecordSet for example. This does require some code to turn on
    some of these sessions, but it is well documented.

    Or are you referring to an actually html table being built from your
    data? In this case the <cfsavecontent variable="foobar"></cfsavcontent>
    will do what you want, just wrap the generated output on these tags and
    it is saved to the variable given in the variable parameter.

    HTH

    Ian Skinner

    T McDizzle wrote:
    > Is there a way for me to take a table that is being built dynamically and have
    > it be stored as static information in memory somehow so that I can sort it in
    > anyway that I want. Due to various complications (read my other post to know
    > more), after many many hours and dozens of attempts at getting the table to
    > sort the way I want it to in the queries, I cannot. I basically want to store
    > the information in the dynamic table that is being built so that I can sort by
    > any of the columns that I would like. Any ideas would be appreciated.
    >
    Ian Skinner Guest

  4. #3

    Default Re: Dynamic to static

    It is an actual HTML table being built from data, and while the <cfsavecontent>
    tag would store the data , I don't think it would allow me to sort that data.
    If it can, please let me know how. If not, I'll probably need more
    recommendations. Thanks though.

    T McDizzle Guest

  5. #4

    Default Re: Dynamic to static

    Nothing is going to make a basic HTML table sortable. If you need that
    you are going to be looking at things like DHTML code to include
    javascript to sort the table (or AJAX to take this to the next level),
    or for <cfform> datagrid type controls (or flex to take that to the next
    level).

    But, my first approach would probably be to store the record set data
    that builds the table, sort this as needed then rebuild the HTML.

    T McDizzle wrote:
    > It is an actual HTML table being built from data, and while the <cfsavecontent>
    > tag would store the data , I don't think it would allow me to sort that data.
    > If it can, please let me know how. If not, I'll probably need more
    > recommendations. Thanks though.
    >
    Ian Skinner Guest

  6. #5

    Default Re: Dynamic to static

    You could display your output in a CFGRID, then you could sort by any column at will

    Phil
    paross1 Guest

  7. #6

    Default Re: Dynamic to static

    I've had good luck doing what Ian said - storing the query in the session
    scope. Then I can use query of queries to sort the data using a simple order
    by clause and without having to go back to the database on each pageload. To
    rebuild the table, I loop through the reordered query.

    This does assume that your data is relatively static because you're not
    getting any updates from the database on your resorts.

    JaredJBlackburn Guest

  8. #7

    Default Re: Dynamic to static

    I have 2 main questions at this point:
    1.) Is there a way to create a CFGrid with two queries and then sort the
    entire table based on one query?
    2.) How exactly do I go about doing this with a session or recordset, whatever
    the case may be, to get it to sort properly?
    The more input the better. Thanks to everyone for helping thus far.

    T McDizzle Guest

  9. #8

    Default Re: Dynamic to static

    Combine and sort your two queries in a Q-of-Q, then use it to drive your CFGRID.

    Phil
    paross1 Guest

  10. #9

    Default Re: Dynamic to static

    simple problem, simple solution!

    use one page to select your sort oder column selection.

    use result page to set session variable for column name, the use if/else
    statements to qury database by selection.

    Do it all the time, works well.

    SSandlin Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139