|
Mm... Not quite right. To put it easily, here’s how: First, read about MVC in the CakePHP manual. It gives a big
picture about the whole web thing. From what I understand, what you’re trying to do is to add a
logic (code that processes objects and stuff) into your view (the THTML file).
While possible, this is NOT a preferred way. All of the logic (including any functions) need to be placed on
the controller. The controller will pass data to the view via $this->set(‘key’,
‘value’) method. The view will never need to process anything but the values set
from the above method. The less the client (or the view) need to know about how to
process data, the better your solution would be. Don’t hesitate to send back
the data/tag/extra info to the server (using POST - <form> or GET - <a
href>). That’s just the way the web works. From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of ??? Yang Su Li thanks & kissssssssssssssssssss :) so you think the form and _javascript_ thing didnot work
out because of arguements missing? 2006/11/4, Adrian Godong <[EMAIL PROTECTED]>: Your second solution (the one
setting up a flag) is the best way to do that. Don't forget to set any
additional data you need in the session. On 11/4/06, [EMAIL PROTECTED]
< [EMAIL PROTECTED]>
wrote:
<br --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~--- |
- RE: how to call a function when somebody click a link? Adrian Godong
