SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Guru
    Join Date
    Feb 2007
    Posts
    731
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    PHP Affecting Javascript?

    I have made a javascript selection menu which displays perfectly when the code is on a page on its own:

    http://www.ukhomefurniture.co.uk/test/mouseovertest.php

    However, when I implant the same code on the full page on which I want it to appear it goes haywire with large gaps all over place, I have managed to get it down to a small gap between the top menu and splash image. A colleague I work with suggests it may be down to the PHP affecting. Can anyone advise how I can fix it so the gap is removed:

    http://www.ukhomefurniture.co.uk/test/indextest.php

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,862
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    It can't be the PHP affecting it because the PHP finishes running before any of the JavaScript can start running.

    Most likely a CSS problem since that is what affects appearance of the page although it could also be a clash with other JavaScript in the page (I haven't looked at your page to try to work out which of these it would be).
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    SitePoint Guru
    Join Date
    Feb 2007
    Posts
    731
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thanks, do you know how I can track down what the issue is?

    I have tried all sorts of methods. I've gone through all of the surround DIVS and I cant find what is affecting it.

    Could it be anything to do with the page naming like an old HTML?

  4. #4
    SitePoint Member
    Join Date
    Jan 2009
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Using Mozilla + Firebug extension was always a good approach for me in this situations. You can see from where are properties inherited and find a clue what is causing you this trouble.

  5. #5
    SitePoint Guru
    Join Date
    Feb 2007
    Posts
    731
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thats great, thanks for that.

    Is it this one: https://addons.mozilla.org/en-US/firefox/addon/1843/

  6. #6
    SitePoint Member
    Join Date
    Jan 2009
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes


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
  •