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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:03:15+00:00 2026-06-13T00:03:15+00:00

I have page where I click on a link and change the content a

  • 0

I have page where I click on a link and change the content a of div with this code. I fill out that content with page1.php (it’s a form with some dropdown lists).

When I try to click on a dropdown list it resets it. How can I stop resting my from when I try to select something from a drop down list?

<script type="text/javascript">
  $(function(){ 

    $('#page1').click(function(){
       pageUrl = 'page1.php';
       LoadingPages(pageUrl);
     })

     function LoadingPages(pageUrl){
       $('#content').load(pageUrl);
     }

     int = setInterval(function(){
       LoadingPages(pageUrl)
     },5000);
  });
</script>

HTML (taken from comment’s)

<a href="#" id="page1">something</a> 
<div id="content"> 
  • 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-13T00:03:16+00:00Added an answer on June 13, 2026 at 12:03 am

    As suresh.g mentioned, using onClick on an element gets fired even if you click any inner element. The workaround is to set an action on the inner elements, you want to be clicked and stop their event propagation UPWARDS in the DOM tree. Thus it will fire the inner event and stop it from moving outwords, this preventing your #content onclick. Code is something like that:

    $("#some_inner_element").bind('click', function(e){
        // Do your magic
        e.preventDefault();
        e.stopPropagation();
        e.stopImmediatePropagation();
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is my function: $(.link).click(function(event){ event.preventDefault(); event.stopPropagation(); pageLoad = $(this).data('page'); $('div#loading').fadeIn(); $('div#content').load('pages/'+pageLoad); }); I
I have a code <div id=content></div> I load into this content my Ajax content
I have a few tabs on a page that have this markup <div id=holiday-details-nav>
Basically I have a web page that has a div id=content and a div
I have some textboxes on a page and I want to click a link
I have a page where the visitor initiates a function that executes click() on
So I have a page setup that lets you expend text boxes upon click:
I have a page with photo gallery http://dev.dolina-imeniy.ru/fotogalereya/kp_usadba_tishnevo/ I use this to bind click
I have an application page. I want to click a button to pop out
I have this html: <div id=signbtn> <a id=login-link class=btnsignin title=Login>Sign in</a> </div> Upon successful

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.