vForums Support > Programming & Coding :: Code Requests & Support :: > Help Finishing A Code Please

Help Finishing A Code Please - Posted By dog199200 (dog199200) on 7th Oct 08 at 11:27pm
Hey I am "Trying" to do a code that replaces the forums #footerstats, and #footertime classes with a person's own copyright, but I can't see to get it to work. I know because there is two classes being called in that area, some has to be shut off, so i am going to be trying to shut off the #footerstats calls and run off the #footertime class and to do that i did this:

Code:
 
  1. <script type="text/javascript">
  2. <!--
  3. if(get('footerstats','id')){
  4.     get('footerstats','id').parentNode.style.display = 'none';
  5. }
  6. if(get('footertime','id')){
  7.         f[i].innerHTML = f[i].innerHTML.replace(footertime).style.display = 'Copyright text here';
  8. //-->
  9. </script>
 


But it doesn't work. So can someone please tell me what I did wrong and help me correct it?

Edit: opps forgot to say that the code doesn't nothing at all.

Re: Help Finishing A Code Please - Posted By Ross (admin) on 9th Oct 08 at 8:41am
Code:
 
  1. <script type="text/javascript">
  2. // We can only modify elements already on the page. As the footers get outputted before the bar at the bottom we have to wait until the page has loaded
  3. window.onload = function() {
  4.     // Double Check that the footer does exist
  5.     if(get('footerstats', ID)) {
  6.         // Give it a completly new innerHTML, there's no need to keep the old stuff
  7.         get('footerstats', ID).innerHTML = 'Copyright Text';
  8.         // This will remove the time if that's what you walso wanted
  9.         get('footertime', ID).style.display = 'none';
  10.     }
  11. }
  12. </script>
 


I've included some comments with notes on what each bit does {Smile}

Re: Help Finishing A Code Please - Posted By dog199200 (dog199200) on 9th Oct 08 at 11:39am
oh ok, i see, ty so much. O want to learn so that i can try to help out around here some time.