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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:11:11+00:00 2026-05-24T17:11:11+00:00

Just a heads up, I understand why there would be rules against allowing this

  • 0

Just a heads up, I understand why there would be rules against allowing this to function as it would be assumed to, due to the ramifications of someone opening a ton of spam pop-up windows, however, I’m wondering if it is at all possible to make it work.

Here’s my code;

$(document).ready( function() {
    ("a.explode").load( 
    function() { var url = $(this).attr("href"); 
    window.open(url); }
    );                      
});

and

<a class="explode" href="http://www.google.com">Link1</a>
<a class="explode" href="http://www.yahoo.com">Link2</a>
<a class="explode" href="http://www.tumblr.com">Link3</a>

For those who don’t understand what I’m trying to do, on page load, several windows are opened, using the href="" attribute of <a class="explode">.

POST EXPERIMENTATION EDIT: After working through this with a lovely member of SO, we figured out that this is not worth implementing/impossible (due to pop-up blockers most browsers natively have). window.open() must be bound to a .click() event, in effect making the concept useless.

  • 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-24T17:11:11+00:00Added an answer on May 24, 2026 at 5:11 pm

    You are missing $ in the code while selecting anchors. Use each block and href property of anchor like this

    $(document).ready(function() {
        $("a.explode").each(function() {  
          window.open(this.href); 
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just stumbled onto this SO question and was wondering if there would be
Just wondering if anyone knew off the top of their heads if there was
Just trying to get my head around Generics by reading this enlightening article by
I have tried this project on both android and ios with little success. There
I'm getting started on a new MVC project where there are some peculiar rules
I Just can't seem to wrap my head around them. As I understand it's
I'm asking more about what this means to my code. I understand the concepts
I know this has been addressed many times, but i just cant seem to
Can anyone tell me how to do this? I've just started learning javascript. I
Just getting my head around Ruby metaprogramming. The mixin/modules always manage to confuse me.

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.