Results 1 to 4 of 4

Thread: Dynanic Generation of Chrome Menu

  1. #1
    Join Date
    Dec 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Dynanic Generation of Chrome Menu

    1) Script Title: Chrome CSS Drop Down Menu (v2.01)

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...rome/index.htm

    3) Describe problem: I've been using version 2.0 of the Chrome menu and I've been able to dynamically generate the menu. Meaning, I add the appropriate elements to the DOM (i.e. <divs>, <uls>, etc) that the menu needs through Javascript based upon certain criteria. I then call cssdropdown.startchrome and the menu is generated. I'm now using version 2.1. Firefox works fine, but IE only displays the IFrameshim. Any suggestions?

    Also, is version 2.0 that fixed the FF 2.0 problem available? Thanks for your help.

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

    Default

    Well version 2.01 is identical to version 2.0 except for the iframe shim feature. If you disable that in the script, it should basically behave the same as 2.0, dynamically generated (the HTML nodes) or not:

    Code:
    enableiframeshim: 1, //0 disables it in .js file

  3. #3
    Join Date
    Dec 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks very much. Unfortunately, changing the enableiftameshim value to 0 didn't fully work for me.

    However, I was able to fix the problem by commenting out the "if" statement at the end of chrome.js:
    if (window.createPopup && !window.XmlHttpRequest) . . .

    The problem doesn't appear when all is static, but dynamic generation causes the problem. (Realizing that generating chrome dynamically is pushing it). In a future version, you may wish to not run the if statement when enableiftameshim=0.

    Thanks for the help, the menu is great.

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

    Default

    Ah well, by removing the last chunk of code starting from "if", you do disable even the HTML for the iframe shim to be written out, not just the feature. You're right, I should probably modify the setting so disabling the iframe shim will include disabling its HTML from being written out.

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
  •