Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4000948
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:50:41+00:00 2026-05-20T07:50:41+00:00

Here’s what I’m trying to do… It’s quite simple and obviously there must be

  • 0

Here’s what I’m trying to do… It’s quite simple and obviously there must be something wrong in what I’m doing but I can’t see it, hope you can help me… I have a Vertical Jquery Menu (using accordions) that I want to remember its state. So, I have this code in my Master Page to handle each click over the accordions:

$(document).ready(function () {
    var toOpen = <%= MySessionInfo.Current.MyMenu %>;
    if(toOpen != -1){            
        $("#accordionMenu").accordion( "activate", toOpen); 
    }

    $("#accordionMenu").click(function (){
        var activate = $("#accordionMenu").accordion("option", "active");
        if (activate != false) {
            $.getJSON("/Account/SetMenu", { CurrentMenu: activate }, function (j) {});
        }
    });
 });

Then I have the Partial View with the Menu defined as a set of divs in which there are one ul and lots of li links for each section.

And in my Account Controller I use this:

public void SetMenu(int CurrentMenu)
{
    MySessionInfo.Current.MyMenu = CurrentMenu;    

}

What’s going on?: It works fine in the beginning and saves the state ok but when the next page loads it wont refresh the status. I also observed that right exactly after the “SetMenu” is called from the view and right before going to the called view this error happens:

uncaught exception: [Exception… “Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.getAllResponseHeaders]” nsresult: “0x80040111 (NS_ERROR_NOT_AVAILABLE)” location: “JS frame :: http://localhost:20984/Scripts/jquery-1.4.2.min.js :: anonymous :: line 7207″ data: no]

I hope you can give me hand on this issue soon… Regards!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T07:50:42+00:00Added an answer on May 20, 2026 at 7:50 am

    The solution is a lot stranger than the question itself. I created a javascript function “updateMenu()” that calls the jquery “activate” and I call it in the end of the body as window.onload=updateMenu:

    function updateMenu(){
        var toOpen = <%= MySessionInfo.Current.MyMenu %>;
        if(toOpen != -1){            
            $("#accordionMenu").accordion( "activate", toOpen); 
        }
    }
    
    window.onload=updateMenu;
    

    I’m not sure why it works this way and not the other, but it worked fine for me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's the basic setup. I'm trying to create a simple middleware component that would
Here the total height of all <div> 's are 900 pixels, but the jQuery
Here is some simple code: DIR* pd = opendir(xxxx); struct dirent *cur; while (cur
Here's what I'm trying to accomplish with this program: a recursive method that checks
here is my configuration: http://domain.com (obviously fictitious name...) hosted on a server running Apache
Here is the css: #content ul { font-size: 12px; } I am trying this:
Here is a simple timepicker to jQuery UI's datepicker <script type=text/javascript> /* <![CDATA[ */
Here is the problem that I am trying to solve. I have two folders
Here's what I'm doing. I want to upload multipart file via Ajax to my
Here is my code sample, let me know if it can be further improved?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.