Top page Banner script

Discussion in 'JavaScript' started by raicabogdan, Aug 18, 2009.

  1. #1
    Hello, I need a script that will be added after </body> and will be displayed at the top of the page.
    I know is posible, I have this code :

    <script type="text/javascript">
    var object = document.createElement('div');
    object.innerHTML = 'The banner script is HERE';
    var body = document.getElementsByTagName('body')[0];
    body.insertBefore(object, body.firstChild);
    </script>
    Code (markup):
    The problem with this cod is that is shows in forum phpbb3 in the login page and after is loged in, twice in the header.
    Demo problem: http://www.ionut.totalh.com/forum/ucp.php?mode=login

    Just so you know, I need to add html script banner and the JS will be placed right before </html> and AFTER </body>.

    Can someone help me here ?
    Kind Regards.
     
    raicabogdan, Aug 18, 2009 IP
  2. nabil_kadimi

    nabil_kadimi Well-Known Member

    Messages:
    1,065
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    195
  3. raicabogdan

    raicabogdan Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I don't understand. Why that link ? I need help with my script ... Can someone help me ?
     
    raicabogdan, Aug 18, 2009 IP