Hi all, I'm working in a helper that has to output lot of JS code. The thing
is that I really dislike coding JS as string (ie "alert('whatever')")
becouse I'm loosing all the code completition that modern IDE's do for me.
So I'm actually doing something like this:
(inside a helper class)
function getSomeHtml(){
$output = ob_get_clean();
ob_start();
?>
HTML and JS here
<?php
$returnValue = ob_get_clean();
ob_start();
echo $output;
return $returnValue;
}
But I noticed that most helpers (even Cake core ones) use the other way of
coding (creating JS as a PHP string). So I guess what I'm doing isn't good
at all. Any sugestions?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---