vForums Support :: Programming & Coding :: Code Requests & Support :: Help Finishing A Code Please - View Topic
| |
| 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: - <script type="text/javascript">
- <!--
- if(get('footerstats','id')){
- get('footerstats','id').parentNode.style.display = 'none';
- }
- if(get('footertime','id')){
- f[i].innerHTML = f[i].innerHTML.replace(footertime).style.display = 'Copyright text here';
- //-->
- </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
Posts: 3,709 Status: Offline Gender: Male Age: 8 1⁄1 Joined:
Additional Groups: Support Team
pmwwwgtalkvForum | Re: Help Finishing A Code Please (9th Oct 08 at 8:41am UTC) | | Code: - <script type="text/javascript">
- // 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
- window.onload = function() {
- // Double Check that the footer does exist
- if(get('footerstats', ID)) {
- // Give it a completly new innerHTML, there's no need to keep the old stuff
- get('footerstats', ID).innerHTML = 'Copyright Text';
- // This will remove the time if that's what you walso wanted
- get('footertime', ID).style.display = 'none';
- }
- }
- </script>
I've included some comments with notes on what each bit does | |
|
| 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. | |
| |
| |
|