i tried and fail. but if i do strings only it works!:
Image with ajax:
Code: Select all
TableFooter();
function PartUpdate($a)
{
echo"<td><img height='128' width='128' src='{$webBaseDir}modules/tbs/images/$a.png'></td>";
}
Ajax::RegisterFunction("PartUpdate","partToUpdate");
TableHeader("This part will be updated");
echo "<div id='partToUpdate'>";
echo"image will display here";
echo "</div>";
TableFooter();
ButtonArea();
Ajax::Button("Click Me","PartUpdate(3)");
EndButtonArea();
With Strings only:
Code: Select all
TableFooter();
function PartUpdate()
{
echo "sucker!";
}
Ajax::RegisterFunction("PartUpdate","partToUpdate");
TableHeader("This part will be updated");
echo "<div id='partToUpdate'>";
echo"hi";
echo "</div>";
TableFooter();
ButtonArea();
Ajax::Button("Click Me","PartUpdate()");
EndButtonArea();
can anyone figure out how to do ajax with image?