System.Web.UI.WebControls
[ class tree: System.Web.UI.WebControls ] [ index: System.Web.UI.WebControls ] [ all elements ]

Source for file LAnchorForm.php

Documentation is available at LAnchorForm.php

  1. <?php
  2. /**
  3. * Class file.
  4. *
  5. * @license http://opensource.org/licenses/mozilla1.1.php Mozilla Public License
  6. * @copyright 2005, diemeisterei GmbH. All rights reserved.
  7. * @author $Author: schmunk $
  8. * @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 $
  9. * @package Lithron
  10. * @subpackage none
  11. */
  12.  
  13. /**
  14. * LAnchorForm
  15. *
  16. * Subclass of TForm with the additional ability to submit to an anchor
  17. *
  18. * @package System.Web.UI.WebControls
  19. * @subpackage None
  20. */
  21. class LAnchorForm extends TForm
  22. {
  23. /**
  24. * adds the ancor javascript
  25. * @param unused generic parameter
  26. */
  27. public function onInit($param)
  28. {
  29. parent::onInit($param);
  30. $ascript = <<<EOS
  31. var submitToAnchor = "";
  32. function afSubmit(theform)
  33. {
  34. if (submitToAnchor == "") return;
  35. newaction = theform.action+"#ba"+submitToAnchor;
  36. theform.action = newaction;
  37. }
  38. EOS;
  39.  
  40. $cs = $this->getPage()->getClientScript();
  41. $cs->registerBeginScript("AnchorForm", $ascript);
  42. $this->Attributes->add("onsubmit", "afSubmit(this);");
  43. }
  44. }
  45.  
  46. ?>

Documentation generated on Tue, 20 Jun 2006 05:14:57 +0200 by phpDocumentor 1.3.0RC4