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 7808109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:03:15+00:00 2026-06-02T03:03:15+00:00

I have this page which has tabs. Content in say, tab 1 loads as

  • 0

I have this page which has tabs. Content in say, tab 1 loads as the default content. when i click on tab 1 it loads content like this:

 $('.options').load('index.php?viewfile='+filee+' .optionsPane', function(data) {
      //inside here i initialized tinymce because the page has tinymce contents.
}

and in that tab 1 there is a form. I have link a js page to the page which contains all the functions. and there i have this code.

  $(document).ready(function(){
      $('.bottommernuform').submit(function () {
        var idval = $(this).attr('id').toString();
        var idvalarr = idval.split("-");
        var region_name= idvalarr[idvalarr.length-1];
        var publish = $('#regionstate-'+region_name).val();
        var swap = $('#swapregion-'+region_name).val();
        var page_url = $('#page-'+region_name).val();
        $.post("index.php", { publish:publish , swap:swap, region_name:region_name}, 
                            function(data) {
                                //alert(data);

                        });

 return false;
});

this works perfectly when i click on forms submit button after loading the page completely. But if i click on tab 1 which loads content from load() $('.bottommernuform').submit() is not getting called .. it refreshes the whole page. Even more after clicking on tab 1, when i tried to save contents in tinymce it gives me an error too. How can i fix this. Please give me a solution. Help much appreciated!
});

  • 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-06-02T03:03:17+00:00Added an answer on June 2, 2026 at 3:03 am

    There are two possible issues here. First, loading content with .load() will not trigger $(document).ready() so none of your code in $(document).ready() will run after the new code is loaded.

    Second, when you use static event handling like:

    $('.bottommernuform').submit(fn)
    

    This event handler will only be in operation for '.bottommernuform' objects that existed at the time the event handler was first installed. That means it will not be in operation for content that is loaded in the future.

    If you are loading content dynammically and you want previously installed event handlers to work with that new content, then you need to use delegated event handling like this:

    $(staticParentSelector).on('submit', '.bottommernuform', fn);
    

    The selector in this jQuery object must be a static parent object of the dynamically loaded .bottommernuform objects (e.g. something that exists at the time your document.ready() code runs and is a parent of all .bottommernuform objects). For best performance, it should be the closest parent to the target as possible that is not dynamically loaded.

    Also, remember that to prevent the default behavior of a submit action, you should return(false) from your submit event handler.

    Note: .on() was added to jQuery in v1.7. For versions prior to v1.7, you can use .delegate() which works similarly, but has the arguments in a different order.

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

Sidebar

Related Questions

I have a php page. This has multiple images which looks like tabs. With
I have a aspx page which has three tabs. When I click a button
I have a page which has document.body.onload=function(){...} but this is suffering delays because the
This may sound a weird question, I have a page which has a link:
I have a page which work like a navigation and a iframe in this
I have a select box on a classic ASP page which looks like this:
I'm confused as to how to accomplish this. I have a page which, has
I have a webpage which has three tabs, and depending on which tab is
I have this situation: A page with an accordion with 2 tabs, one has
I have this html page which is very simple, it contains a text box

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.