Advanced Search

Results 1 to 2 of 2

Thread: slashdot menu issue

  1. #1
    Join Date
    Aug 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default slashdot menu issue

    1) Script Title: Slashdot Menu issue

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/slashdot.htm

    3) Describe problem: Menu works perfectly when testing on personal computer. Does not work the way I want it to upon uploading it to the server. I've discovered that it's a cookie issue. When I turn cookies off in IE8 and google chrome, the menu works perfectly. But I don't want the end user to have to turn off their cookies everytime they visit our site. Also, by turning cookies off while viewing our website, if I am surfing under a separate tab in the browser, having cookies turned off affects all other websites under each tab of the browser. Sucks if I'm multitasking.

    Here's how I have it programmed. For each asp file (luncheons, agm, ufe-dates, etc.) below under the first category (Upcoming events), the programming is as follows:

    HTML Code:

    HTML Code:
    <div align="left" class="expand">
    <span>Upcoming Events</span>
            <a href="luncheons.asp">Council Meetings/Member Lunches</a>
    		<a href="agm.asp">Annual General Meeting</a>
    		<a href="ufe-dates.asp">UFE Dates</a>
    		<a href="convocation.asp">Convocation</a>
    		<a href="upcoming.asp">Professional Development</a>
    
        </div>
    			  <div align="left" class="collapsed">
            <span>Professional Opportunities</span>
            <a href="employment.asp">Employment Opportunities</a>
    		<a href="volunteer.asp">Volunteer Opportunities</a>
    		<a href="http://www.casource.com/" target="_blank">CA Source</a>
    		<a href="http://www.directorssource.com/" target="_blank">Directors Source</a>
    
        </div>
    
    Under professional opportunities, all asp files have this coding:
    
    HTML Code:
    <div align="left" class="collapsed">
    <span>Upcoming Events</span>
            <a href="luncheons.asp">Council Meetings/Member Lunches</a>
    		<a href="agm.asp">Annual General Meeting</a>
    		<a href="ufe-dates.asp">UFE Dates</a>
    		<a href="convocation.asp">Convocation</a>
    		<a href="upcoming.asp">Professional Development</a>
    
        </div>
    			  <div align="left" class="expand">
            <span>Professional Opportunities</span>
            <a href="employment.asp">Employment Opportunities</a>
    		<a href="volunteer.asp">Volunteer Opportunities</a>
    		<a href="http://www.casource.com/" target="_blank">CA Source</a>
    		<a href="http://www.directorssource.com/" target="_blank">Directors Source</a>
    
        </div>
    So basically, if I choose "convocation.asp" that menu remains expanded while category "Professional Opp" remains collapsed. I can then open the prof. opp category and choose "volunteer.asp", the page loads and the "Upcoming Events" is collapsed while the Prof opp category is expanded. It remains expanded as I continue to choose files from the submenu - until I choose something under a different category. I hope what I'm saying is a good explanation of what's happening. This works perfectly on my computer but cookies are affecting how it behaves on the server.

    Is there a way around this (some kind of code) I can incorporate into the asp files that will fix this problem? I've googled the issue endlessly for a few days now and I can't find a solution. I know there is code that you can change in the js file that will automatically turn off cookies when someone visits our site. But I think that would also affect any other websites that the user is visiting under a different tab in the browser. Also, I tried the change this.remember = true; to false, (as one person suggested) but that didn't make a difference.

    Code:
    function SDMenu(id) {
    	if (!document.getElementById || !document.getElementsByTagName)
    		return false;
    	this.menu = document.getElementById(id);
    	this.submenus = this.menu.getElementsByTagName("div");
    	this.remember = true;
    	this.speed = 3;
    	this.markCurrent = true;
    	this.oneSmOnly = false;
    Does anyone have any fixes? I would appreciate. If you require a link to the website to view it in action, please let me know. Thanks!
    Last edited by keyboard; 11-08-2012 at 06:16 PM. Reason: Format: Html Tags [html][/html], Code Tafs [code][/code]

  2. #2
    Join Date
    Aug 2004
    Posts
    9,864
    Thanks
    3
    Thanked 960 Times in 949 Posts
    Blog Entries
    15

    Default

    Hmm while it's unlikely the cause is a conflict between the Slashdot menu's cookie name and your other scripts', just to rule it out, try changing the code in red below inside sdmenu.js to something else:

    Code:
    document.cookie = "sdmenu_" + encodeURIComponent(this.menu.id) + "=" + states.join("") + "; expires=" + d.toGMTString() + "; path=/";
    such as _slashdotmenu. If that doesn't work, try also deleting the "path=/" part in bold above. Finally, please post a link to the problem page.
    DD Admin

Similar Threads

  1. Slashdot Menu Issue
    By mmunro57 in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 10-31-2011, 06:39 PM
  2. Slashdot Menu - highlight specific menu item
    By Ppietje in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 08-18-2008, 12:26 PM
  3. Safari Slashdot menu issue
    By theakston in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 11-27-2007, 04:56 PM
  4. Slashdot Menu - Submenu Issue - Please help
    By jcoleman in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 09-11-2007, 02:09 PM
  5. Slashdot Menu collapse / expand issue
    By Rohit Malik in forum Dynamic Drive scripts help
    Replies: 5
    Last Post: 07-19-2007, 07:55 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
  •