else
echo "<form method='post' action='$action' $name>\n";
- echo "<input type=\"hidden\" id=\"_focus\" name=\"_focus\" value=\"\">";
}
//---------------------------------------------------------------------------------
{
if ($breaks)
br($breaks);
+ echo "<input type=\"hidden\" name=\"_focus\" value=\"".$_POST['_focus']."\">\n";
echo "</form>\n";
}
function meta_forward($forward_to, $params="")
{
+ global $Ajax;
echo "<meta http-equiv='Refresh' content='0; url=$forward_to?$params'>\n";
echo "<center><br>" . _("You should automatically be forwarded.");
echo " " . _("If this does not happen") . " " . "<a href='$forward_to'>" . _("click here") . "</a> " . _("to continue") . ".<br><br>\n";
+ $Ajax->redirect($forward_to.'?'.$params);
exit;
}
function hyperlink_back($center=true)
{
- echo get_js_go_back();
-
if ($center)
echo "<center>";
echo "<a href='javascript:goBack();'>"._("Back")."</a>\n";
{
for ($i = 0; $i < $num; $i++)
echo "<br>";
-}
+}
+
+$ajax_divs = array();
+
+function div_start($id='')
+{
+ global $ajax_divs;
+
+ array_push($ajax_divs, $id);
+ echo "<div ". ($id !='' ? "id='$id'" : '').">";
+ ob_start();
+}
+
+function div_end()
+{
+ global $ajax_divs, $Ajax;
+
+ if (count($ajax_divs)) {
+ $id = array_pop($ajax_divs);
+ $Ajax->addUpdate($id, $id, ob_get_flush());
+ echo "</div>";
+ }
+}
?>
\ No newline at end of file