From c097a2128a3cfc37ef91f7cd09e6b069f305333d Mon Sep 17 00:00:00 2001 From: wei <> Date: Thu, 19 Jan 2006 05:10:02 +0000 Subject: Fixed TLinkButton. --- framework/Web/Javascripts/js/prado.js | 3 +++ framework/Web/Javascripts/prado/form.js | 1 + framework/Web/UI/WebControls/TLinkButton.php | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) (limited to 'framework/Web') diff --git a/framework/Web/Javascripts/js/prado.js b/framework/Web/Javascripts/js/prado.js index 53ff4aba..1f92a539 100644 --- a/framework/Web/Javascripts/js/prado.js +++ b/framework/Web/Javascripts/js/prado.js @@ -2202,6 +2202,9 @@ _17.value=_14["EventTarget"]; $("PRADO_POSTBACK_TARGET").value=_14["EventTarget"]; $("PRADO_POSTBACK_PARAMETER").value=_14["EventParameter"]; Event.fireEvent(_15,"submit"); +if(_14["StopEvent"]){ +Event.stop(_13); +} }; Prado.Element={setValue:function(_1,_2){ diff --git a/framework/Web/Javascripts/prado/form.js b/framework/Web/Javascripts/prado/form.js index 03d9ab30..9c443c52 100644 --- a/framework/Web/Javascripts/prado/form.js +++ b/framework/Web/Javascripts/prado/form.js @@ -127,6 +127,7 @@ Prado.PostBack = function(event,options) $('PRADO_POSTBACK_TARGET').value = options['EventTarget']; $('PRADO_POSTBACK_PARAMETER').value = options['EventParameter']; Event.fireEvent(form,"submit"); + if(options['StopEvent']) Event.stop(event); } /* diff --git a/framework/Web/UI/WebControls/TLinkButton.php b/framework/Web/UI/WebControls/TLinkButton.php index 01441d99..b8d1ccaa 100644 --- a/framework/Web/UI/WebControls/TLinkButton.php +++ b/framework/Web/UI/WebControls/TLinkButton.php @@ -86,7 +86,7 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler { $url = $this->getPostBackUrl(); //create unique no-op url references - $nop = "javascript:;//".$this->getClientID(); + $nop = "#".$this->getClientID(); $writer->addAttribute('href', $url ? $url : $nop); $this->getPage()->getClientScript()->registerPostBackControl($this); } @@ -105,6 +105,7 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler $options['CausesValidation'] = $this->getCausesValidation(); $options['ValidationGroup'] = $this->getValidationGroup(); $options['PostBackUrl'] = $this->getPostBackUrl(); + $options['StopEvent'] = true; return $options; } -- cgit v1.2.3