Solved size parameters ignored in IE9

Posted on 2011-05-11
Last Modified: 2012-05-11
We are using code that has worked for years on all other browsers and platforms, to open a new window in javascript using the traditional function.  ()see code snippet).

However, this code does not work in IE9. The new window opens in full screen, we are unable to get it to open using smaller dimensions that we pass to the function.

Has anyone else run into problems with in IE9? Any thoughts?

Thanks experts!
var popUpLinkWin=0;
// popUpLinkWindow
// optional arguments: width,height,left,top
function popUpLinkWindow(url)
    	if(!popUpLinkWin.closed) popUpLinkWin.close();
	var nWidth=600;
	var nHeight=400;
	var nLeft=10;
	var nTop=10;
	if (popUpLinkWindow.arguments.length > 1)
		nWidth = parseInt(popUpLinkWindow.arguments[1])
	if (popUpLinkWindow.arguments.length > 2)
		nHeight = parseInt(popUpLinkWindow.arguments[2])
	if (popUpLinkWindow.arguments.length > 3)
		nLeft = parseInt(popUpLinkWindow.arguments[3])
	if (popUpLinkWindow.arguments.length > 4)
		nTop = parseInt(popUpLinkWindow.arguments[4])
	popUpLinkWin = open(url, 'link', 'height=' + nHeight + ',width=' + nWidth + ',left=' + nLeft + ',top=' + nTop + ',toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,location=yes,directories=yes,status=yes');
	return popUpLinkWin;

Open in new window

Question by:rascal
    LVL 1

    Accepted Solution

    Found the problem: scrollbars=yes

    If we changed it to scrollbars=no then the sizing dimensions work. Thanks Microsoft for another quality product. You are the new IBM.
    LVL 1

    Author Closing Comment

    I found the solution myself.
    LVL 1

    Author Comment

    FOLLOWUP: Changing the scrollbars=yes to scrollbars=1 also fixes the problem.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Both jQuery and Mootools offer some nice, easy to use scripts. Mootools is best known for their interactive slideshows and jQuery for their menus, but both have many other uses as well.   jQuery is basically a toolkit with many DOM (http://en.wik…
    This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now