Results 1 to 4 of 4

Thread: Chained menu not working

  1. #1
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

    Default Chained menu not working

    1) Script Title: Chained Menu

    2) Script URL (on DD): http://dynamicdrive.com/dynamicindex...ects/index.htm

    3) Describe problem: I used to have the script working on f.ex. https://croatia-luxury-villa.com/dalmatia/, but now suddenly it seems not to work anymore.
    I added a js-function in the head, besides the one in the body tag.
    Here's the links to the two js-files:
    - https://croatia-luxury-villa.com/js/chainedmenu.js
    - https://croatia-luxury-villa.com/js/configvillas.js
    Could anyone please let me know wht suddenly went wrong, as it all worked fine before.

  2. #2
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

    Default

    UPDATE:
    In this page: https://croatia-luxury-villa.com/js/configvillas.js
    When it is set up to open in a new window, all works fine, like this:
    Code:
    var newwindow=1 //Open links in new window or not? 1=yes, 0=no.
    But when it is set to open in the same window (var newwindow=0), then the link doesn't open.
    How come, please?

  3. #3
    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'm responding here because this is where you first asked about this, and it should be separate. In the other thread where you mentioned it though, I see you were using a loader function to initiate this script. That's fine, you can do that. But if you do, you should not load it a second time using the body onload attribute.

    Now, once you've got that settled, the problem with opening the selection in the same window is that the form submits before that happens. To prevent that, add the highlighted to the HTML portion of the code:

    Code:
            	                    <form name="listmenu0" class="form" onsubmit="return false;">
                    	                <div class="row">
    						<select class="c-input size-2" name="firstlevel"></select>
    						<select class="c-input size-2" name="secondlevel"></select>
    						<select class="c-input size-2" na . . .
    Last edited by jscheuer1; 09-26-2017 at 08:46 PM. Reason: English Usage
    - John
    ________________________

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

  4. The Following User Says Thank You to jscheuer1 For This Useful Post:

    chechu (09-26-2017)

  5. #4
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

Similar Threads

  1. chained menu
    By chechu in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 08-31-2008, 09:29 AM
  2. Chained Menu
    By Exitilus in forum Looking for such a script or service
    Replies: 1
    Last Post: 10-24-2007, 01:20 AM
  3. help with chained menu
    By benj in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 08-19-2007, 05:36 AM
  4. Chained menu!
    By Stepan in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 11-24-2006, 09:51 AM
  5. Chained Menu Help
    By LKristin21 in forum ASP
    Replies: 0
    Last Post: 11-17-2005, 01:59 PM

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
  •