JS files conflicting

Started by denede, February 08, 2013, 07:44:28 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


read the post, did what it said there, loaded the java only for that page, in stdhead then in stdfoot, then combined, and still the same issue.
i believe it is something to do with the js file itself.


In order to use the $stdfoot or $stdhead arrays for js you need to install pdq's mod for improving your trackers speed, its posted here, if conflicts occur its usually because the scripts need to be loaded in stdhead or stdfoot, pdq's mod allows that control, v3 has css to each page also, it means you don't need to load all the js on stdhead and have silly overhead not needed, you can load jquery in stdhead globally then on the scripts you require certain js scripts, load that script only on that page.


What to do when 2 or several JS files are conflicting?
Noticed this when i've tried to test my signup and invite signup pages.

on this pages i have
$HTMLOUT .= "<script type='text/javascript' src='scripts/check.js'></script>
             <script type='text/javascript' src='captcha/captcha.js'></script>

but only one of them will work if it is on the 2nd line
as it is posted above, the captcha will work, but if the check is 2nd, that will work and the captcha won't. the captcha image will show, i can refresh it when i click it, but the field where i type in the word won't get red or green.

edit: tried to do this.

$stdfoot = array(/** include js **/'js' => array('check', 'captcha'));
and at the end
print stdhead('Invite Signup') . $HTMLOUT . stdfoot($stdfoot);

and now none of the js files are working. but from where is $stdfoot taking the js file ? i need to define it somewhere?