Make row hyperlink
I'm hoping someone can help me out. I'm wanting all the cells in a given row to link to the same location. Currently, I have the following code:
// LINKS
obj.setCellLink(myCells);
obj.setCellTemplate(new AW.Templates.Link);
This works, however each cells link is the cell value. Each row has a PK in the MySQL database. What I'm wanting is that when a user clicks on the row, it will load up an edit screen at which time they can edit/save the data. Is there a way to get this to populate the setCellLink variable with the PK that it's pulling from the database? (for the sake of this exercise, let's assume that the PK is stored in t1.studyNum ).
I am using the following code to query/populate the cells:
function aw_cells($dataset){
$rows = array();
while ($record = @mysql_fetch_row($dataset)) {
$cols = array();
foreach ($record as $value) {
$cols[] = '"'.addslashes($value).'"';
}
$rows[] = "\t[".implode(",", $cols)."]";
}
echo "[\n".implode(",\n",$rows)."\n];\n";
}
Thank you!
// LINKS
obj.setCellLink(myCells);
obj.setCellTemplate(new AW.Templates.Link);
This works, however each cells link is the cell value. Each row has a PK in the MySQL database. What I'm wanting is that when a user clicks on the row, it will load up an edit screen at which time they can edit/save the data. Is there a way to get this to populate the setCellLink variable with the PK that it's pulling from the database? (for the sake of this exercise, let's assume that the PK is stored in t1.studyNum ).
I am using the following code to query/populate the cells:
function aw_cells($dataset){
$rows = array();
while ($record = @mysql_fetch_row($dataset)) {
$cols = array();
foreach ($record as $value) {
$cols[] = '"'.addslashes($value).'"';
}
$rows[] = "\t[".implode(",", $cols)."]";
}
echo "[\n".implode(",\n",$rows)."\n];\n";
}
Thank you!
Confused...
July 31,