Results 1 to 2 of 2

Thread: Accordian menu loading problem

  1. #1
    Join Date
    Aug 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Accordian menu loading problem

    1) Script Title:
    Accordion Menu script (v1.7.1)
    Ajax Tabs Content Script (v 2.2)

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

    3) Describe problem: I combined the 2 scripts so that I could show a much smaller menu. The accordian script works on page load but after using the tab the menu stops working. Any idea what I can do to get around this problem as the setup works really well on my test site here:

    http://cam-shots.co.uk/photoshopsuk/testsite/

    Regards
    Mark

    UPDATE
    I have found a kind of work around for the above now. I have added location.reload() to the ajax tabs js file so that the page reloads each time the tab is clicked upon. I can live with this solution is no other is available.
    Last edited by Mkjones; 08-17-2011 at 09:04 AM.

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

    Default

    Ah this isn't an issue with the script, but rather, just a pesky limitation of Ajax. Pages fetched via Ajax should they contain JavaScripts within it in many cases won't run correctly when brought over this way. Ajax basically copies the contents of the external file similar to copying plain text and just dumps it onto the main page. Browsers don't know to interpret scripts or even CSS (in IE) within that copied content.

    There are a few workarounds to this limitation in general, but no quick fix. One option is to switch to the IFRAME method of loading content inside Ajax Tabs Content script, which doesn't have this issue with scripts inside the loaded pages not executing properly.
    DD Admin

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
  •