Results 1 to 9 of 9

Thread: Help with Chained Selects Menu

  1. #1
    Join Date
    Apr 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help with Chained Selects Menu

    This post refers to the following script:
    Chained Selects Menu Script
    http://www.dynamicdrive.com/dynamici...menu/index.htm

    After downloading the necessary files and playing around with it, when I tested the script It worked like a charm. But when I try and put the html code in my own template it breaks. Which would lead me to believe that something in my html template code is causing the script to break, but I cannot figure it out. Anyone care to help.
    I am using all the original files located at the URL above. I have modified the sample.html file with my template. I am attatching the new file as sample2.txt
    Thanks for any insight,
    M

  2. #2
    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

    That's some template! Anyways, this:
    HTML Code:
    <link title="WDNR Master Style Sheet" href="/css/dnr.css" type="text/css" rel="stylesheet">
    depending on what it says in dnr.css could be a problem. Especially if it changes the display of tables and their contents.

    This:

    HTML Code:
    <LINK REL=SCHEMA.dc HREF="http://purl.org/dc/documents/rec-dces-19990702.htm">
    may introduce other conflicting elements. perhaps even scripts, depending on what rec-dces-19990702.htm has on it. I'm not familiar with the SCHEMA.dc REL, it may not be the type of link that can cause problems

    Code:
    <!--#include virtual="/includes/footer.inc"-->
    here's another, depends on what's in footer.inc

    HTML Code:
    <LINK REL=SCHEMA.DC HREF="http://www.dpi.state.wi.us/dltcl/rll/pdf/wicv.pdf">
    this might be trouble too, probably not, as it is a .pdf file.

    To tell If any of these is causing the problem remove them and see if that fixes it. If so, add them back one at a time to find the offending one(s). Once you find the problem one(s) you need to look at the actual code it adds to see if there is a way to either compensate with changes to your page or to the script you want to use.

  3. #3
    Join Date
    Apr 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the suggestions. I appreciate your time in looking at my problem. Unfortunately I tried what you suggested (removing the offending code) and it did not work. So it must be something else... I'll keep trying to figure it out.

  4. #4
    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

    Just as clarification, the code is innocent until proven guilty. Not as a matter of fairness, but one of logic. I'll have another look at your sample. Does the page work locally?
    - John
    ________________________

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

  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

    I missed two suspects:
    Code:
    <!-- #include virtual="/includes/header.inc" -->
    and:
    Code:
    <!--#include virtual="/invasives/includes/leftnavlong.inc"-->
    running the page locally would prevent all these suspicious links and includes from having any effect, as long as you don't have them on or linked via network to your local computer. Good for testing.
    - John
    ________________________

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

  6. #6
    Join Date
    Apr 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well I tried the page locally and it does not work. I am attatching the original file with out the template as sample.txt
    When I tried this locally it did work, so.... It must be something silly I did in the sample2.txt file to make it break...
    Thanks for comparing the 2 files again and for all your help with 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

    part of the problem:

    HTML Code:
           <td width="484"><a name="content"></a>
            <div id="content">
    added in the template, conflicts with variable 'content' and/or use of names and/or id's called 'content' in the chainedmenu.js script.

    Solutions:

    1) Don't use this in the template, or ---
    2) Change all references in chainedmenu.js to 'content' to another word, like 'stuff' Make sure the HTML markup on your page agrees with this and the other script file too. (if they mention content, change it there too, just not in the template language shown above)

    There seems to be another problem though, all fields are available onload but, at least they are there, could just be an artifact of my trouble shooting process. Take care of this problem and let me know.
    - John
    ________________________

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

  8. #8
    Join Date
    Apr 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks!
    I changed the work content in the .js file and now it seems to work....
    What was the other problem you alluded to in your last post?

  9. #9
    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

    As I said, it may have been an artifact of the debugging process. You see these chained selects have a persistence feature. While I saw nothing in the boxes, the persistence was probably still setting things up. So, when I fixed it, things looked odd. All the boxes looked active. I figured I'd let you check it out fresh first before worrying about it.
    - John
    ________________________

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

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
  •