Server Processing with Coldfusion

Server Processing with Coldfusion

jasch2244jasch2244 Posts: 15Questions: 0Answers: 0
edited October 2010 in General
With the code for coldfusion server processing that has been provided... does anyone know how to take the code given and add html dynamic linking to the text with in the cells? Where do you put the html link in the action page? Any help would be greatly appreciated :)

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Just one thread with the question will do - let's keep the discussion in the other one: http://datatables.net/forums/comments.php?DiscussionID=645&page=1#Item_8

    Allan
  • jasch2244jasch2244 Posts: 15Questions: 0Answers: 0
    Allen:
    Thanks for your reponse, unforntunately I'm using the code you provided under the server side processing as it currently works as datatables should. In the code below under the Output (commented section) it appears it is looping through a list (#listColumns#) so I can't seem to figure out where to place the html a href link or how to grab the dynamic id of ContactID to place as a parameter at the end of the link example (www.mypage?ContactID=#ContactID#)

    [code]

    <!--- table name --->


    <!--- list of database columns which should be read and sent back to DataTables --->


    <!--- Indexed column --->


    <!--- ColdFusion Datasource for the MySQL connection --->


    <!---
    If you just want to use the basic configuration for DataTables with ColdFusion server-side, there is no need to edit below this line

    Note: there is additional configuration below for the "version" column in query and output
    --->

    <!---
    ColdFusion Specific Note: I handle Paging, Filtering and Ordering a bit different than some of the other server side versions
    --->

    <!---
    Paging
    --->
    <!---
    ColdFusion Specific Note: I am handling paging in the cfoutput statement instead of limit.
    --->



    <!---
    Filtering
    NOTE: this does not match the built-in DataTables filtering which does it
    word by word on any field. It's possible to do here, but concerned about efficiency
    on very large tables, and MySQL's regex functionality is very limited
    --->

    <!--- ColdFusion Specific Note: I am handling this in the actual query call, because i want the statement parameterized to avoid possible sql injection --->


    <!--- Ordering --->


    <!--- SQL queriesGet data to display --->

    <!--- Data set after filtering --->

    SELECT SQL_CALC_FOUND_ROWS #listColumns#
    FROM #sTableName#

    WHERE OR #thisColumn# LIKE <!--- special case --->


    ORDER BY , #listGetAt(listColumns,(url["iSortCol_"&thisS]+1))# #url["sSortDir_"&thisS]#



    <!--- Total data set length --->

    SELECT COUNT(#sIndexColumn#) as total
    FROM #sTableName#


    <!--- Output--- I GUESS SOMEWHERE IN THIS CODE I NEED THE LINK AND TO BE ABLE TO GRAB CONTACTID FROM QUERY--->

    {"sEcho": #val(url.sEcho)#,
    "iTotalRecords": #qCount.total#,
    "iTotalDisplayRecords": #qFiltered.recordCount#,
    "aaData": [

    ,
    [,"-""#jsStringFormat(version)#""#jsStringFormat(qFiltered[thisColumn][qFiltered.currentRow])#"]
    ] }



    [/code]
This discussion has been closed.