Making a Table Row linkable with constructing filename path

Making a Table Row linkable with constructing filename path

anhtinanhtin Posts: 1Questions: 0Answers: 0
edited January 2013 in General
Hi,

I'm a newbie to the programming world, so I would need your help with a simple question.

Right now I'm able to display my Data Table from an Access Database with all the necessary columns (TNo, TNoRev, Title, Type and D_Release).

I would like to have an entire colum "TNo" linkable, so that when I click on it, another page would display all the File Listing on that specific "TNo" directory.

Ex1: When selecting an clickable row, with an TNo = 1234, another page would pop-up and display all the files listing on the directory C:/temp/1234... (demo of directory or file listing http://www.brainjar.com/)

Ex2: clicking on row TNo=123456 would list all the files on directory C:/temp/123456...and so on...

Here are my questions :

1) What is the proper function and code to use for an entire Column Link ?
2) What is the code, function to use to construct a file name path?
3) Do I need to create another .asp for the pop-up page ?

Here is my code:
[code]




Demo









var hlr = 0; // Reference to the currently highlighted row

function rowClick()
{
if (hlr)
$("td:first", hlr).parent().children().each(function(){$(this).removeClass('markrow');});
hlr = this;
$("td:first", this).parent().children().each(function(){$(this).addClass('markrow');});

}

$(document).ready(function() {
oTable = $('#mydataTable').dataTable({
"iDisplayLength": 10,
"sPaginationType": "full_numbers",
"bFilter": true,
"bJQueryUI": true,
"bProcessing": true,
"oSearch":{
"sSearch":"",
"bRegex": false,
"bSmart": true },
"aoColumnDefs": [
{ "bSearchable": true, "bVisible": false, "aTargets": [ 0 ] },
{ "bSearchable": false, "bVisible": true, "aTargets": [ 2,4,8 ] },
{ "bSearchable": false, "bVisible": false, "aTargets": [ 5,6,7 ] }
]
} )
.columnFilter({
sPlaceHolder: "head:before",
aoColumns: [
null,
null,
null,
{
type: "select",
values: ['Gabarit de perçage / Drill jig', 'Bloc de formage / Form block', 'Gabarit de pliage / Flat pattern', 'Gabarit de localisation / Locating jig',
'Moule / Mold', 'Autre outil / Miscellaneous tool', 'Gabarit de découpe / Routing template', 'Pièce factice / Sample part', 'Outil général / General Tool',
'Assembly jig', 'Gabarit de manutention / Handling Fixture', 'Model Maitre / Master Model',
'Outil de travail / Pickup jig', 'Outil autorisé / Authorized Shop Aid Tooling']
}
]
} );
$('#mydataTable tbody').delegate("tr", "click", rowClick);
} );





<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0; Data Source=C:\\Documents and Settings\\k0535919\My Documents\\_SITE OUTILLAGE\\Outillage 19-dec-2012\\RequeteOutillage_DATA.mdb;Jet OLEDB:System Database=C:\\Documents and Settings\\k0535919\My Documents\\_SITE OUTILLAGE\\Outillage 19-dec-2012\\RequeteOutillage.mdw;User ID=rapport;"
conn.Open "C:\Documents and Settings\k0535919\My Documents\_SITE OUTILLAGE\Outillage 19-dec-2012\RequeteOutillage_DATA.mdb"

set rs = Server.CreateObject("ADODB.recordset")
rs.Open "SELECT qryVW_T_T_O.TO_ID,qryVW_T_T_O.TNo,qryVW_T_T_O.TNoRev,qryVW_T_T_O.Title,T_Type.ToDes,qryVW_T_T_O.Status_ID,qryVW_T_T_O.ReqType_ID,T_UB.UB,qryVW_T_T_O.D_Release FROM ((qryVW_T_T_O INNER JOIN T_Type ON qryVW_T_T_O.ToolType_ID = T_Type.ID) INNER JOIN T_UB ON qryVW_T_T_O.LocID = T_UB.ID) WHERE Status_ID = 7 AND (ReqType_ID = 1 OR ReqType_ID = 2) ORDER BY qryVW_T_T_O.TNoRev", conn
%>




TR
#Outil
Révision
Nom
Type
Status
Req Type
Département
Date de relâche


<%do until rs.EOF%>

<%for each x in rs.Fields%>
<%Response.Write(x.value)%>
<%next
rs.MoveNext%>

<%loop
rs.close
conn.close
%>






[/code]
This discussion has been closed.