Code not working in Chrome & maybe IE

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

<html>
<head>
<title>Show LS250</title>
<script>
function go_ls250() {
	str = "https://www.lakoshvac.com/<? print $fname; ?>";
	window.open(str);
	window.location = "projectsn.php";	
	self.close();
}
</script>
</head>
<body onLoad="go_ls250()";>

</body>
</html>

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

x
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.

Thanks
0
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.
0
Richard KortsBusiness Owner / Chief DeveloperAuthor Commented:
Dave,

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

Thanks,

Richard
0
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 http://www.dibsplace.com/webdev/index.html to open or download a PDF.
0

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.

Richard
1
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
HTML

From novice to tech pro — start learning today.