Error msg: 'null' is null or not an object?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • skyplus
    New Member
    • Jul 2008
    • 1

    Error msg: 'null' is null or not an object?

    When i try to go over the image I get this error message in the browser:

    'null' is null or not an object

    This is what the files look like:

    [PHP] $null_str = substr(md5(uniq id(mt_rand())), 0,5);
    $img_id = $row[item_nid].'_'.$null_str;
    if ($db) {
    $t=0;
    $db->query("selec t * from mall_color where mc_pid='$row[item_nid]' and mc_part=0 order by mc_nid");
    if ($db->numrow>1) {
    while ($mrow = $db->nrecord(1)) {
    $color_select .="<td style='padding: 2 2 2 2'><a href='javascrip t:void(0)' onMouseOver=\"g etElementById(' $img_id').src=' image/item_color_big/$mrow[mc_bfile]'\" hidefocus='true '><img src='image/item_color_smal l/$mrow[mc_sfile]' style='border:1 px solid #cccccc' height=10 width=18></a></td>\n";

    if (!(++$t%5)) $color_select .="</tr><tr>";
    }
    }
    }[/PHP]
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    That is definitely not Java code; do you mean Javascript perhaps?

    kind regards,

    Jos (moderator)

    ps. tell me whether you want me to delete this thread or move it over to a
    Javascript forum.

    Comment

    • ajos
      Contributor
      • Aug 2007
      • 283

      #3
      Definitely php and javaScript problem here.

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Why is it always my duty to take out the trash?
        <Moved to PHP forum>

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          Actually a JavaScript error message, so moved to the JavaScript forum.

          getElementById is a document method, not a window one, so should be document.getEle mentById().

          Comment

          Working...