vForums Support Banner


Visit Base Classics - Gaming Chairs

 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: Help Finishing A Code Please - View Topic
Topic Rating: *****
Printable View
dog199200
Guest
Help Finishing A Code Please (7th Oct 08 at 11:27pm UTC)
Resolved
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.
Ross
Administrator
*****

[Avatar]

Posts: 3,709
Status: Offline
Gender: Male
Age: 8 11
Joined:  

Additional Groups:
Support Team
***


Reputation: 45%  


pmwwwtwittergtalkvForum
Re: Help Finishing A Code Please (9th Oct 08 at 8:41am UTC)
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}

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

All times are GMT+0 :: The current time is 9:45pm
Page generated in 0.8171 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums