未捕获的ReferenceError:未定义onload_functions(匿名函数)

时间:2014-11-10 12:24:03

标签: javascript

嗨我有一个问题,得到一些小的JavaScript工作它适用于phpbb 3.0.12但新的3.1.1失败 错误是Uncaught ReferenceError:未定义onload_functions(匿名函数)

电话



<script type="text/javascript">
// <![CDATA[
var colour_mark_forums = '{U_MARK_FORUMS}';
onload_functions[onload_functions.length] = 'colour_parse_forums();';
// ]]>
</script>
&#13;
&#13;
&#13;

javascript

&#13;
&#13;
function colour_parse_forums()
{
    var is_new;
    // find all categories
    $('div.forabg').each(function(i) 
    {
        if($('li.row-new', this).length > 0)
        {
            $(this).addClass('block-new');
        }
    });
    // find all forums
    if(colour_mark_forums && colour_mark_forums.indexOf("&amp;mark=forums") > 0);
    {
        $('li.row-new').dblclick(function()
        {
            colour_mark_read(this.id);
        });
    }
}
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:0)

https://wiki.phpbb.com/PhpBB3.1#Moving_from_3.0_to_3.1

onload_functions.push(colour_parse_forums);