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

  • Home
  • SEARCH
  • 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 5985993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:36:34+00:00 2026-05-22T22:36:34+00:00

I have a page named index.html . On it, I have a menu with

  • 0

I have a page named index.html. On it, I have a menu with the 2 options below:

┏━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┓
┃   Classes   ┃ Update calendar ┃
┗━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━┛

And then I have an empty div where I put the contents of the page:

<div id="content"></div>

There’s also an external JavaScript file (menu.js) which manages the menu options. (code below)

Then, on calendar.php I store two controls: a calendar and a login form. (code below)
The idea is:

  • when the user clicks on the Update calendar option, calendar.php will be loaded into the contents div but only the login form will show.
  • when the user clicks on the Classes option, calendar.php will be loaded into the contents div but only the calendar will show.

I’m currently using $(selector).load(url) to load calendar.php (see below).
The Update calendar option works as expected,
but when I click on Classes, both calendar and login form show up.


menu.js

<script type="text/javascript">
    $(document).ready(function(){
        var sections = $("#menu li");
        var loading = $("#loading");
        var content = $("#content");

        sections.click(function(){ //When the user clicks an option...
            showLoading(); //show the loading bar

            switch(this.id) {
                case "classes"://if the Classes option is clicked...
                    content.load("calendar.php", hideLoading); break;

                case "classes_update"://if the Update calendar option is clicked...
                    content.load("calendar.php #section_update", hideLoading); break;

                default: //if nothing is clicked...
                    hideLoading(); break;
            }
        });
    });
</script>

calendar.php

<head>
    <!-- links to JQuery resources -->

    <script type='text/javascript'>
        $(document).ready(function() {
            $('#calendar').fullCalendar({
                header: {
                    left: 'prev,next today',
                    center: 'title',
                    right: 'month,agendaWeek,agendaDay'
                }
            });
        });
    </script>

    <!-- other calendar styles -->
</head>
<body>
    <div id="calendar"></div> <!-- calendar area -->

    <div id="section_update"> <!-- login form area -->

        <!-- form stuff -->

    </div>
</body>
  • 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-22T22:36:35+00:00Added an answer on May 22, 2026 at 10:36 pm

    After struggling and scouring the ajax/jquery information on the web, I spotted what seemed to give me some hopes. And voila!! it worked.

    On the page menu.js in the switch statement code for “Classes” menu option, I used an ajax callback function and simply set the html property of the login form to be an empty div like this

    $(‘#section_update’).html(”);

    And that did the trick!

    Thank you all, and my special thanks to “jmendeth” who helped me reformat my question so it can be better understood!.

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

Sidebar

Related Questions

I am using rails beta 3 and I have a erb page named index.html.erb
I have declared global variable named counter=0 on my index.html page inside head section
I have an HTML5 page ( index.html ), and I need to display the
I have a Create new account page. The form is in page named Register.php
I have an HTML page. I would like to extract all elements whose name
Here is my set up... I have two pages, index.html and cart.html. I have
I have the following HTML: <ul class=vertical_menu no_select> <li class=edge_top>&nbsp;</li> <!-- Menu Items Here
I have a page that I am trying to create with a div on
In my mysql database I have the following information in a page name field.
I have a page that is displaying a company name and its details from

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.