Quote:
Originally Posted by RedGTiVR6
I'm currently getting an error in both IE7 and FF3:
Using FireBug, I see the following:
Code:
mgc_cb_evo_autocomplete is not defined
(?)()()private....pmid=5248 (line 336)
onreadystatechange()()jquery.js (line 27)
onreadystatechange()()jquery.js (line 27)
nodeName()([function()], function(), undefined)jquery.js (line 21)
onreadystatechange()()jquery.js (line 27)
[Break on this error] mgc_cb_evo_autocomplete();
The code appears to be:
Code:
$(document).ready(function(){
mgc_cb_evo_autocomplete();
Any ideas what would cause this?
|
I think i figured it out.
the function mgc_cb_evo_autocomplete() is in a template that is only used when the chatbox is active.
However, the function is called on every page since msc_cb_evo_headerinclude is included every where.
I removed the following code
Code:
function mgc_cb_evo_autocomplete()
{
<if condition="!empty($autocompletion_js)">
$("#mgc_cb_evo_input").autocomplete([$autocompletion_js]);
<else />
;
</if>
}
from the mgc_cb_evo template and put it in the headinclude template
my new mgc_cb_evo_headinclude template looks as such.
Code:
<!-- JS -->
<script type="text/javascript" src="clientscript/mgc_cb_evo_add/js/jquery.js"></script>
<script type="text/javascript" src="clientscript/mgc_cb_evo_add/js/jquery.autocomplete.js"></script>
<script type="text/javascript" src="clientscript/mgc_cb_evo_add/js/jquery.blockUI.js"></script>
<!-- CSS -->
<link rel="stylesheet" href="clientscript/mgc_cb_evo_add/css/jquery.autocomplete.css" type="text/css" media="screen" />
<script>
function mgc_cb_evo_autocomplete()
{
<if condition="!empty($autocompletion_js)">
$("#mgc_cb_evo_input").autocomplete([$autocompletion_js]);
<else />
;
</if>
}
$(document).ready(function(){
mgc_cb_evo_autocomplete();
});
</script>