IE and Popups

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
Pavilion
Forum Contributor
Posts: 301
Joined: Thu Feb 23, 2012 6:51 am

IE and Popups

Post by Pavilion »

Hello:

I'm using some javascript to open a pop-up window. Since file uploads have to be handled with form post (rather than jQuery, javascript post), I need a separate php doc w/html form. This is why I chose a pop-up.

The javascript is as follows:

Code: Select all

			// Handle pop-up for attaching files.
			if (var_attachFiles == true)
			{
			// Popup settings to center window:
			// http://www.quackit.com/javascript/popup_windows.cfm
			var_w=800;
			var_h=600;
			var_url="../site/files_popup.php";
			var_title="topic_attch";
			var_left = screen.width/4; // 400;
			var_top =  screen.height/6; // 150;
			var_settings ='height='+var_h+',width='+var_w+',top='+var_top+',left='+var_left+',scrollbars=no,resizable';

			popupWindow = window.open(var_url,var_title,var_settings);
			popupWindow.focus;
			}
This works great in Firefox. However IE blocks pop-ups. Users have to hold down the ctrl key while clicking the command button. It's a settings issue, I know. All a user has to do is change some of their settings. But... here's the problem, there are plenty of users out there who don't know how to change settings and IE does not give any kind of guidance.

Is there any way to by-pass IE's blocks on pop-ups. If not, I'll figure out how to display some kind of warning for the user. But... first I'd like to know if it's possible to get around IE's blocks?

Thanks Much:

Pavilion
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: IE and Popups

Post by social_experiment »

have a look at the url below, could be useful
http://www.greywyvern.com/?post=201
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Post Reply