I have an ajax request which works fine. I am testing out secnarios that the
end user may try in advance to see what would happen.
My link in the view;
<?php echo $html->link('  ',
array('controller'=>'journal','action'=>'quicksave',$journal['Journal']['id'
]), array('class'=>'save_me')); ?>
 
So I open firebug and remove the Journal.id from the link so it looks like
site/journal/quicksave/ instead of site/journal/quicksave/65 
 
What I need to do is ensure that there is a Journal.id when the quicksave
function runs.
 
I tried putting if (!journalID) inside the function but the view is still
rendered (blank because the url still calls quicksave)
 
Tried before filter / render
 
if ($this->action = 'quicksave')
        {
            debug($journal_id);
        }
Results in 
Undefined variable:$journal_id
 
Tried inside the if ($this->RequestHandler->isAjax()) {
but that does nothing but render the blank view because at this point its
too late....
 
How / where should I try to determine if there was no $journal_id then dont
render anything or error what not...what ever I decide.
 
Dave


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to