Jump to content

[SOLVED] object required error


ballhogjoni

Recommended Posts

my error is on line 456 char 4. Can someone helpwith this error?

 

<script type="text/javascript">
var c = new Array("#FFFF33", "#FFFF00", "#FFFF33", "#FFFF55", "#d6e7f8", "#FFFF55", "#FFFF33", "#FFFF00", "#FFFF33", "#FFFF55", "#d6e7f8", "#FFFF55", "#FFFF33", "#FFFF00", "#FFFF33", "#FFFF55", "#d6e7f8", "#FFFF55", "#FFFF33", "#FFFF00", "#FFFF33", "#FFFF55","#d6e7f8", "#FFFF55", "#FFFF33", "#FFFF00", "#FFFF33", "#FFFF55", "#d6e7f8", "#FFFF55", "#FFFF33", "#FFFF00", "#FFFF33", "#FFFF55", "#d6e7f8", "#FFFF55", "#FFFF33", "#FFFF00", "#FFFF33", "#FFFF55", "#d6e7f8", "#FFFF55", "#FFFF33", "#FFFF00", "#FFFF33", "#FFFF55", "#d6e7f8", "#FFFF55", "#FFFF33", "#FFFF00", "#FFFF33", "#FFFF55", "#d6e7f8", "#FFFF55", "#FFFF33", "#FFFF00", "#FFFF33", "#FFFF55", "#d6e7f8", "#FFFF55", "#FFFF33", "#FFFF00", "#FFFF33", "#FFFF55");

x = 0;

function bg_eff()
   {
   col_val = c[x];
   document.getElementById("colorize").style.background = col_val;
   x++;
   if (x == 64)
      {
      document.getElementById("colorize").style.background="#d6e7f8"; <!--Line 456-->
  clearInterval(change_bg);
      }
   }
change_bg = setInterval("bg_eff()", 200);
</script>

Link to comment
Share on other sites

no - but the original example I gave you worked fine (other then the uncompleted author's comments tag you left in there); you must have changed something. look at the original code to see if you can find your error. because all I had to do was take the javascript and add a div or a table or any html element, that allows you to change the background color, and it works perfectly fine (without any errors).

 

http://www.phpfreaks.com/forums/index.php/topic,178342.msg793698.html#msg793698

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.