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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:04:32+00:00 2026-05-13T12:04:32+00:00

I am opening a link in a new window using jQuery: <script type=text/javascript> $(document).ready(function()

  • 0

I am opening a link in a new window using jQuery:

<script type="text/javascript">
$(document).ready(function() {
    $('a[href="/education/global-health-courses"]').attr("target", "_blank");    
});
</script>

I would like to set the size of the new window to 800px wide by 700px tall. I just need a little help adding those attributes to the existing code.

Thanks.

  • 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-13T12:04:33+00:00Added an answer on May 13, 2026 at 12:04 pm

    You can’t set those attributes using the target="_blank" method, you have to use the window.open method:

    $(document).ready(function() {
        $('a[href="/education/global-health-courses"]').click(function() {
            window.open($(this).attr('href'),'title', 'width=800, height=700');
            return false;
        });   
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using javascript for opening a new window when clicked on the link.
have a a problem with opening a new window using javascript. In Chrome and
How to enable opening links exposed via s:link in a new window http://www.jsftoolbox.com/documentation/seam/09-TagReference/seam-link.html
I'm opening a modal dialog for IE6 and above using the following javascript. window.showModalDialog(
I know JavaScript can open a link in a new window but is it
I'm using the following code to open the link in a new window, its
Why is this not opening in a new window? <a href=http://www.authorsden.com/visit/viewwork.asp?id=49784&AuthorID=157940> <img src=authors_den.jpg target=blank
I have a simple html file. Using javascript I am opening a https link
I'm trying to prevent A HREF from actually opening the link, but to execute
When opening a new tkinter window, I only want the user to be able

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.