Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    probably easy, but I don't know

    Hi,
    I tried using the following script in a CafePress shop to hide all the >> marks. If worked, but hides the footer that cafepress adds in. (after my html) I assume the problem is that there is html being inserted in the page after the script. I'm thinking I should be able to somehow modify it so that I can place the script right before or after the table it's supposed to work on. I just don't know what I'd put instead of innerHTML.

    Code:
    <script language="javascript">
       var str = document.body.innerHTML;
       document.body.innerHTML = str.replace(//gi, "&nbsp;");
    </script>

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,472
    Thanks
    0
    Thanked 634 Times in 624 Posts
    Is it the first/only table in the page? If so you can use

    var str = document.getElementsByTagName('table')[0].innerHTML;

    If it's the second table replace the 0 with 1.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    thanks, but

    Hi,
    Thanks so much for the prompt help, but it's not the first or second thable. In fact, I think the number of that table in sequence might vary a bit from page to page. If I put that script right before the table it's going to be used on, would that work?

    If it helps, here's a sample of the type of page I want to use this on...

    http://www.cafepress.com/igeeks


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •