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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:36:40+00:00 2026-05-28T14:36:40+00:00

I am using PrototypeJS’s e.stop() function in a click observer, which I do some

  • 0

I am using PrototypeJS’s e.stop() function in a click observer, which I do some checks and if passes some conditions, I want the link to behave as normal, but stop all other elements from firing.

For example:

<script type="text/javascript"> 
document.observe('dom:loaded',function(){
   if ($$('a') != undefined) {
      $$('a').invoke('observe','click', function(e) {    
         if (SOME CONDITION){
            //NORMAL LINK FUNCTIONALITY
            //STOP PARENT
    } else {
            e.stop();
            //CALL FUNCTION
         }
      });
   }
   if ($$('.parent') != undefined) {
      $$('.parent').invoke('observe','click', function(e) {    
         alert('test');
      });
   }
});
</script> 
<div class="parent">
   <a href="javascript:popUp('test.html')">Test 1</a>
   <a href="test.html">Test 2</a>
   <a href="test.html" target="_blank">Test 3</a>
</div>

What happens is parent fires on click of any links. The e.stop() stops that, but stops normal link behaviour as well. Is there a way to tell the link to process as normal, but stop all others?

  • 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-28T14:36:41+00:00Added an answer on May 28, 2026 at 2:36 pm

    When you catch events, you usually just have to “return true;” to have the normal behaviour.

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

Sidebar

Related Questions

I'm using the Prototype.js (from www.prototypejs.org) library to create classes which are extended by
I have an xml webservice which I'm fetching using PrototypeJS. The xml has the
I am using AJAX with prototypejs . Now I want to use browser's back/forward
I was trying to upload file(s) using PrototypeJs request method but I failed. The
im using PrototypeJS for my project, i used Ajax.PeriodicalUpdater, inserts in realtime as i
I want to replace a link with its innerHTML, how is it done? Example:
Using prototype.js, I create a custom object which is going to be a parameter
Im having an issue with using prototypes observe function and gaining access to this
i'm using the prototype.js , PDO , PHP. i want to delete the records
I am using google CDN for jQuery and prototypeJS library in my pages. For

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.