- <?php
- /**
- * Class file.
- *
- * @license http://opensource.org/licenses/mozilla1.1.php Mozilla Public License
- * @copyright 2005, diemeisterei GmbH. All rights reserved.
- * @author $Author: schmunk $
- * @version $Revision: 236 $ $Date: 2006-05-30 23:39:46 +0200 (Di, 30 Mai 2006) $ $HeadURL: https://svn.sourceforge.net/svnroot/lithron/trunk/packages/LContainer/LBrick.php $
- * @package Lithron
- * @subpackage none
- */
-
- /**
- * LAnchorForm
- *
- * Subclass of TForm with the additional ability to submit to an anchor
- *
- * @package System.Web.UI.WebControls
- * @subpackage None
- */
- class LAnchorForm extends TForm
- {
- /**
- * adds the ancor javascript
- * @param unused generic parameter
- */
- public function onInit($param)
- {
- parent::onInit($param);
- $ascript = <<<EOS
- var submitToAnchor = "";
- function afSubmit(theform)
- {
- if (submitToAnchor == "") return;
- newaction = theform.action+"#ba"+submitToAnchor;
- theform.action = newaction;
- }
- EOS;
-
- $cs = $this->getPage()->getClientScript();
- $cs->registerBeginScript("AnchorForm", $ascript);
- $this->Attributes->add("onsubmit", "afSubmit(this);");
- }
- }
-
- ?>