Jump to content

Inserting row id into tickbox...


steveomz

Recommended Posts

Hey there,

 

Im having difficulties getting hold of my developer so I am trying to do this myself...

 

Basically im trying to highlight a row when the user clicks on the check box for the row.

What I cant get is how to place $bla['item_id'] into the checkbox, it keeps on giving an error.

 

I am also hoping that I have inserted two JavaScript functions into one onclick event correctly.

 

 

while($bla = mysql_fetch_assoc($rs_items)){

$origin = $bla['origin'];

echo '<TR  bgcolor="#F3F4F4" id="check_'.$bla['item_id'].'">';

echo '<TD  class="tbl_cell" valign="top"><em>'.$bla['created_date'].'</em> </TD>';

echo '<TD  class="tbl_cell" valign="top"><em>'.$origin.'</em> </TD>';

echo '<TD  class="tbl_cell" valign="top"><em>'.$bla['size_name'].'</em> </TD>';

echo '<TD  class="tbl_cell" valign="top"><em>'.$bla['weight'].'</em> </TD>';

echo '<TD  class="tbl_cell" valign="top"><em>'.

((($bla['action_to_be_performed']=='Send')&&($bla['queue_id']!=''))?'<small>(Queued to be sent - '.$bla['q_to_address1'].', '.$bla['q_country_code'].' - '.substr($bla['queue_date'],0,10).')</small><br>':'').

((($bla['action_to_be_performed']=='Destroy')&&($bla['queue_id']!=''))?'<small>(Queued to be recycled - '.substr($bla['queue_date'],0,10).')</small><br>':'').

(($bla['scan_status']=='complete')?'<a href="download.php?item_id='.$bla['item_id'].'">Scanned</a>':'').

((($bla['scan_status']=='scanning')||($bla['scan_status']=='queued'))?'To be scanned...':'').

((($bla['scan_status']=='uploading'))?'Scanned (uploading...)':'').

((($bla['is_item_scannable']=='N'))?'<a href="#thumb" class="small_popup">Unscannable</a>':'').

// ((stristr($bla['status'],'scan'))?$bla['status']:'').

// (($bla['status']=='Scanned')?'</a>':'').

'</em> </TD>';

echo '<TD  class="tbl_cell" valign="top">'.(($bla['status']=='Queued')?'':'<em>'.

 

 

make_input( 'c',

'queue_item_'.$bla['item_id'],

'q','

input,check_layer_'.$alias_id, "onclick=document.getElementById('queue_alias_$alias_id').checked=false;highlight(this,'check_$bla['item_id']');").

'</em>').' </TD>';

echo '</TR>';

}

Link to comment
https://forums.phpfreaks.com/topic/175311-inserting-row-id-into-tickbox/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.