Skip to:
Content
Pages
Categories
Search
Top
Bottom

Javascript breaks style


  • dogdayfear
    Member

    @dogdayfear

    I have included this piece of code at the top of my index.php file:

    <script language=”javascript”>

    if(top==self)

    this.location=’http://www.somedomein.es/somefolder/page&#8217;;

    </script>

    It checks if bbpress is loaded into an iframe and if not, it redirects to http://www.somedomein.es/somefolder/page and this page load bbpress correctly into an iframe.

    It works perfectly but it breaks the style making the some fonts bigger that they should.

    If I remove the javascript code everything works normally again.

    Any suggestions ?

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)

  • dogdayfear
    Member

    @dogdayfear

    Mmmm ….

    if I include the javascript at the end of the file index.php it does not break the style, but the delay of the redirect is very big …


    dogdayfear
    Member

    @dogdayfear

    I moved the javascript code from index.php to file header.php (between <head> and </head> tags) of the template Im using and everything works now.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar