Recent Topics

StarRating Plugin error on IE b2evo Version 1.9.3

Started by on May 08, 2007 – Contents updated: May 08, 2007

May 08, 2007 20:57    

I have just upgraded my b2evo to version 1.9.3 and then downloaded the Star Rating Plugin from [url=]here[/url], I followed the instruction and added this code


<?php $Plugins->call_by_code'starrating'array('id' => $Item->ID ) ); ?>

and this


<?php $Plugins->call_by_code'starrating'array('display' => 'notice' ) ); ?>
per instruction.

When I tested the plugin in Fire Fox, everything works just fine, but in IE version 6 and 7, I am getting error although I am able to vote in IE, I get Javascript error when the page loads.

Here is the error message on IE

Line 40
Char 2
Error 'document.getElementById(...)' is null or not an object
Code 0

and then URL for the doc in the blog.

Please help

May 09, 2007 14:18

Can you provide a link to your site so I can see this error in action?

May 09, 2007 16:00


The site is running on localhost I am testing it before launching it online

I am posting the javascript file js.js part here in case if the error is from here


var response xmlhttp.responseText;
        var update = new Array();
        //alert (response)
        if(response.indexOf('|') != -1) {
            update response.split('|');
            changeText(update[0], update[1]);
            if (update[2]) disp_notice(update[3]);
            new Effect.Highlight(update[0], {startcolor'#ff9900'endcolor'#EEEEEE'});
function disp_notice(text)
    elid 'ratingResults';
    changeTextelidtext );
    el document.getElementById(elid);
    var theTop 30;
    if (window.innerHeight)
                  pos window.pageYOffset
        else if (document.documentElement && document.documentElement.scrollTop)
                pos document.documentElement.scrollTop
        else if (document.body)
                  pos document.body.scrollTop
        if (pos theToppos theTop;
        else pos += 30;
       pos +'px';
        new Effect.Appear(elid, {from0.0to0.8});
        setTimeout('new Effect.Fade("ratingResults")'4000);
function changeTextdiv2showtext ) {
    // Detect Browser
    var IE = (document.all) ? 0;
    var DOM 0;
 if (parseInt(navigator.appVersion) >=5) {DOM=1};
    // Grab the content from the requested "div" and show it in the "container"
    if (DOM) {
        var viewer document.getElementById(div2show)
    else if(IE) {

Thank You

May 09, 2007 16:06

You may have skipped a step in the setup. There's a skintag that has to be added to insert the ratingResults div.

May 09, 2007 18:02


Thank you for getting back tome again.

Here is what I have done based on [url=]the instruction [/url]

After unzipping the file and put the files in the plugins folder

1. Install the plugin from the admin page
2. Added the following code in the _main.php for the custom skin I am using


<?php $Plugins->call_by_code'starrating'array('id' => $Item->ID ) ); ?>

below the post title

3. Added


<?php $Plugins->call_by_code'starrating'array('display' => 'notice' ) ); ?>
after the openning body in _main.php

I did not add the optional part to add the top rated posts in the side bar.

So I don't think I skipped any step, hope this will help.

Thank You

May 09, 2007 18:53

Ok, good. Can you paste the full error in and show me the line it points to?

May 09, 2007 22:53


I had another java script for the header part of the page and apparently that was the cause of the problem. I removed that script and load it in IE and the star rating works except there is extra blank line next to the last star, I thing this has already been pointed out and we gonna have to live with that.

Thank You very much for everything. You guys are awesome

May 10, 2007 04:40

I'm glad to hear that you got it sorted. You can edit the css if the layout is not how you want.

Form is loading...

powered by b2evolution – This forum is powered by b2evolution CMS, a complete engine for your website.