Code not working in Chrome & maybe IE

I have this code
// show_summ_ls250.php
$fname = "summaries/" . $_SESSION['vid'] . "summary.pdf";
<!DOCTYPE html>

<title>Show LS250</title>
function go_ls250() {
	str = "<? print $fname; ?>";;
	window.location = "projectsn.php";	
<body onLoad="go_ls250()";>


Open in new window

For me, this code works as I expect in both Firefox & Chrome. Bit sure about ie, or whatever it's called

In both cases, it opens a new window & shows the pdf file in the window. The user can review, download, etc.

Fir my customer, it works in FireFox if popups are allowed. It does NOT work in chrome; he says it shows the pdf for an instant, then disappears.

I do not want to be dependent of browser settings on client computer.

How can I make this work as desired REGARDLESS of browser?
Richard KortsBusiness Owner / Chief DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Richard KortsBusiness Owner / Chief DeveloperAuthor Commented:
I just tried it in MS Edge, it does NOT show the window with the pdf displayed.

Dave BaldwinFixer of ProblemsCommented:
You can Not reliably make that work.  Any 'automatic' pop-up will normally be blocked by the browsers pop-up blocker.  Only pop-up that are a result of a user action like clicking on a link on the page are allowed.
Richard KortsBusiness Owner / Chief DeveloperAuthor Commented:

So if I put a link the page that goes to that place (like target="_blank"), that will work?


Dave BaldwinFixer of ProblemsCommented:
That should work as long as they have to click on it to use it.  I use a link on this page to open or download a PDF.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Richard KortsBusiness Owner / Chief DeveloperAuthor Commented:
Works perfect, thanks Date.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.