Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: What is the problem when menu populating?

  1. #1
    Join Date
    Oct 2010
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default What is the problem when menu populating?

    1) Script Title: Flexdropdown

    2) Script URL (on DD): www.dynamicdrive.com/flexdropdown

    3) Describe problem:
    When i mouseover on the hyperlink in my site, the menu items and sub-items are populating from database... it is showing nice in mozilla but in IE at first time when we mouseover on it, it wont display any thing. At second time when we mouseover on it(without refresh page) it will dispaly nice...

    What is the problem and how to fix it?

    Thanking you...

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Please post a link to the page on your site that contains the problematic script so we can check it out.
    DD Admin

  3. #3
    Join Date
    Oct 2010
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    When i mouseover on the hyperlink 'products','companies' menu in top, in my site, http://rfcables.org, the menu items and sub-items are populating from database... it is showing nice in mozilla but in IE at first time when we mouseover on it, it wont display any thing. At second time when we mouseover on it(without refresh page) it will dispaly nice...

    What is the problem and how to fix it?

    Thanking you...
    __________________

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Try giving your page a valid doctype at the very top, for example:

    Code:
    <!DOCTYPE HTML>
    DD Admin

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by ddadmin View Post
    Try giving your page a valid doctype at the very top, for example:

    Code:
    <!DOCTYPE HTML>
    Yes. However - if that doesn't fix it completely or if there are other problems, look at the rfcables.org page in any browser's 'view source'. You will see that it has at least two each (opening and closing) html, head, and body tags. With the change ddadmin recommends, which might fix it, it will now also have two DOCTYPE tags.

    Technically speaking no page is allowed more than one of each of these tags. Many browsers will error correct for this, but some may actually register it as more than one page, which can cause problems.

    To fix that, we have to validate the page as it is served, making whatever changes to both it and the include(s) that are required to produce a valid HTML document.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Oct 2010
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you for your reply...

    I used to include one page into another page. Thats why it showing two times <html><head><body> tags.

    Can you give me the solution, how to prevent this?

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Well first of all try what ddadmin suggests, use the:

    Code:
    <!DOCTYPE html>
    as the very first thing on the rfcables.org page. If that fixes it, fine.

    But to answer your other question, it's pretty much as I said it in my last post. If you have any include, it shouldn't have anything on it that doesn't belong where it's going in the finished document.

    Validate the page at:

    http://validator.w3.org/

    You will see lots of violations. Take a few deep breaths, I know it can be very disconcerting at first. But once you arrange things so that the page that's served is valid, you will generally have less problems. And what problems you do have should be easier to address.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #8
    Join Date
    Oct 2010
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    After adding the <!DOCTYPE html> , the pages are mostly differ in both IE and Mozilla.
    Can you give me the reason? and solution to this problem?

    Thanking you...

  9. #9
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    As the guys already said, you need to clean up your code and use a valid doctype.

    The page that is being included shouldn't have any head or body tags, etc., just the html code. This is so when the pages are served together as a complete page, it only has one set of html, head and body tags, etc., from the main page and just body-worthy html code from your include page.

    Try to visualise your include as a fragment rather than a complete web page in its own right - kind of like a piece from the middle of a jigsaw; on its own it doesn't make much sense but once its viewed as part of the whole, the picture (your web page) becomes complete.

    On the other hand, in cases where you really need to display a whole web page inside another, you would probably have to resort to use of an iframe.

    Anyway, you have your answers from John and ddadmin so now it requires a little more work on your part to cleanup your include page.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  10. #10
    Join Date
    Oct 2010
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you for your reply.

    When i use the <!DOCTYPE html> tag, the format of the page is changed in Mozilla and IE.
    But after adding this <!DOCTYPE html> tag, If the browser is IE6 and IE7 , that menus are not showing properlly.

    Why the format is changed from IE and Mozilla..?

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
  •