Okay, I wasn't able to figure anything out after a few hours of going
over the documentation and Googling so I rolled my own $ajax->image
function, and placed it in the ajax.php file. Here it is:
**
* Creates a formatted IMG element that is Ajax enabled for an onclick
*
* @param string $path Path to the image file, relative to
the webroot/img/ directory.
* @param array $htmlAttributes or $ajaxOptions desired
*/
function image($path, $options = array()) //mine
{
//get the url of the image
if (strpos($path, '://'))
{
$url = $path;
}
else
{
$url = $this->webroot.IMAGES_URL.$this->themeWeb.$path;
}
//parse out the html options
$htmlOptions = $this->__getHtmlOptions($options);
$htmlOptions['onclick'] = $this->remoteFunction($options) . ';
return
false;';
return $this->Html->image($path, $htmlOptions, false);
}
It seems to work OK so far. By the way, is there an official way to
submit potential source code to the project?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---