/    Sign up×
Community /Pin to ProfileBookmark

window.open being funny in chrome and ie

Hi.
I made a little flash video (about 15 seconds), and I’m trying to launch it in a new window when the user clicks a button. So onclick=”runTutorial();” of the button, I do this in javascript

[code]
function runTutorial()
{
window.open(‘path/to/tutorial.html’,’mywindow’,’width=677,height=510,resizable=no,scrollbars=no,toolbar=no,directories=no,menubar=no’);
}
[/code]

The page tutorial.html is just a page containing only the flash video.

It works perfectly fine in Firefox, Opera and Safari.
In Chrome, though, it works the first time I click the button, but if I try to launch the tutorial again, the window pops open, but the flash content doesn’t play.
What’s funnier is that it works just fine in Chrome if I’m running it from my localhost, but not from my actual webserver.

In IE, nothing happens when I click the button. I don’t even get the “Popup blocked” notification.

Anyone know what might be going on? or maybe a better way to launch a video onclick?

Thanks.

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@PacopagauthorOct 19.2011 — Actually, it works fine in IE too. Only problem is with Chrome. I can only play the video once from chrome. It won't play subsequent times.
×

Success!

Help @Pacopag spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...