Closed gadgetto closed 12 years ago
I think the problem is in line 165, 166 of advsearform.class.php.
The JS part is either renderend in HTML head or footer regardless of addJs=0
if ($this->config['addJs'] == 1) $this->modx->regClientStartupScript($jsHeader);
else $this->modx->regClientScript($jsHeader);
This issue has been already fixed by the following piece of code:
if ($this->config['addJs'] == 1)
$this->modx->regClientStartupScript($this->config['jsSearchForm']);
elseif ($this->config['addJs'] == 2)
$this->modx->regClientScript($this->config['jsSearchForm']);
The docs say to set it to 0 to disable it. This is wrong. It has to be set to 2 to disable the Javascripts. http://rtfm.modx.com/extras/revo/advsearch/advsearch.advsearchform
The following part of JavaScript is still rendered at HTML footer if &addJs=
0
- which causes a JScript error: