protected function _getAjaxUrl($url, $attr) { $url = $this->_correctAjaxUrl($url); $retour = "url='" . $url . "';\n"; $slash = "/"; if (JString::endswith($url, "/") === true) { $slash = ""; } if (JString::isNotNull($attr)) { if ($attr == "value") { $retour .= "url=url+'" . $slash . "'+\$(this).val();\n"; } else { if ($attr != null && $attr !== "") { $retour .= "url=url+'" . $slash . "'+(\$(this).attr('" . $attr . "')||'');\n"; } } } return $retour; }