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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:14:23+00:00 2026-05-23T13:14:23+00:00

I am creating popup windows using window.open and setting the height and width of

  • 0

I am creating popup windows using window.open and setting the height and width of the created screen.

The navigation bar always appears (since this is a browser setting beyond my control). The problem is in IE/Firefox the navigation bar is excluded from the height I define which is good, but in Chrome, it is not, so my popup ends up being undersized with a right scrollbar.

What’s the preferred mechanism for dealing with this.

Using a function to set the popup-height which checks the browser type and adds adjustments depending on the result?

 function popupCreator(url, popupname, height, width){

    if(browsertype=="chrome"){  //obviously not this exact code!
        height = height + 20;
    }

    var params = 'width=' + width + ',height=' + height;
    newwin = window.open(url, popupname, params);

 }

Or is there a better way of achieving this?

The full function I am currently using:

 "popup": function (url, popupname, height, width) {
    if (null == width) {
        var width = screen.width / 2;
    }
    if (null == height) {
        var height = screen.height / 2;
    }

    var left = (screen.width - width) / 2;
    var top = (screen.height - height) / 2;
    var params = 'width=' + width + ',height=' + height;
    params += ',top=' + top + ',left=' + left;
    params += ',directories=no';
    params += ',location=no';
    params += ',menubar=no';
    params += ',resizable=no';
    params += ',scrollbars=no';
    params += ',status=no';
    params += ',toolbar=no';
    params += ',dialog=yes';
    params += ',titlebar=no';
    newwin = window.open(url, popupname, params);
    if (window.focus) { newwin.focus() }
    return false;
},
  • 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-23T13:14:23+00:00Added an answer on May 23, 2026 at 1:14 pm

    The visibility of navigation bar is controllable. For instance:

    window.open('http://some-url', 'window-name',
        'location=yes,links=no,scrollbars=yes,toolbar=no,status=no,width=716,height=480');
    

    Location is the only thing that cannot be hidden, because of security reasons.

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

Sidebar

Related Questions

I'm creating a popup window with no URL source using window.open(). I don't give
Creating a popup window from main page with window.open, the child/popup page uses the
I am creating a new window popup window using PopupWindows.PaymentsSummary paymentsSummary = new PopupWindows.PaymentsSummary
I'm having an issue creating a link like <a href=javascript:window.open('www.microsoft.com');>Visit Microsoft</a> using stringbuilder. I
I'm creating a non-intrusive popup window to notify the user when processing a time-consuming
I have succeed creating a popup using this code in c# and wpf <Popup
I'm creating HTML (popup window), EXCEL and PDF report and would like to show
I use PopupWindow class for creating custom popup window. But when I add layout_margin
I'm creating a popup window that has a beforeunload handler installed. When the Close
I'm creating a popup dialog using jQueryUI. I have run into problems because I'm

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.