Change your line:
'data'=> '$(this).attr(id)'
to:
'data'=> '{id: $(this).attr("id")}'
Domanda
<td class="process" id="<?php echo $process['Process']['id'] ?>">
<?php echo $process['Process']['start']; ?>
<?php if (!is_null($process['Process']['end'])) : ?>
- <?php echo $process['Process']['end']; ?>
<?php endif; ?>
<?php echo $process['InstallationEquipment']['Equipment']['name']; ?>
</td>
$this->Js->get(".process")->event('click', $this->JS->request(array(
'controller'=>'lines',
'action'=>'listed'), array(
'update'=>'#conditions',
'async' => true,
'method' => 'post',
'dataExpression'=>true,
'data'=> '$(this).attr(id)'
)));
Hi,
As you can see i try to load content when i click on a "process" but i got the same message which is "id is not defined" on the 'data'=> '$(this).attr(id)'
but I'm sure is set.
Someone can explain how do this in the good way ?
Sorry for my english and thank you for reading.
Soluzione
Change your line:
'data'=> '$(this).attr(id)'
to:
'data'=> '{id: $(this).attr("id")}'