Results 1 to 2 of 2

Thread: JS file clears the <body> tag [SOLVED]

  1. #1
    User
    Join Date
    07-26-09.
    Posts
    175

    Default JS file clears the <body> tag [SOLVED]

    Hi

    I am developing an extension where I want to use a custom javascript file. I include it in my module file by:
    Code:
    $GLOBALS['TL_HEAD'][] = '<script type="text/javascript" src="system/modules/my_module/html/frontend/js/file.js" />';
    However, when I refresh the page, it seems completely blank. The <head> tag looks okay, while the <body> is completely empty! The same thing happens when I include that file normally in fe_page template.
    My javascript file contains only a simple alert('test');

    Any ideas what's wrong?

  2. #2
    User
    Join Date
    07-26-09.
    Posts
    175

    Default Re: JS file clears the <body> tag

    Sovled:
    Code:
    $GLOBALS['TL_HEAD'][] = '<script type="text/javascript" src="system/modules/my_module/html/frontend/js/file.js"></script>';
    </script> was missing :P

Bookmarks

Posting Permissions

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