/    Sign up×
Community /Pin to ProfileBookmark

Why doesn’t this work in IE

Hi, the following code is a close button that i have placed on my php page:

echo “<center><input type=’button’ value=’Close’ onClick=’javascript:window.close();’ /></center>”;

The button works fine in FF but when i click on it in IE it does not do anything

Does anyone know why? Thanks in advance

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@MrNobodyFeb 19.2008 — Try this complete replacement for your line:

echo '<center><input type="button" value="Close" onclick="top.close();return true;" /></center>';
Copy linkTweet thisAlerts:
@oo7mlauthorFeb 19.2008 — I thought it had to be in single quotes. I will try your code later, thanks
Copy linkTweet thisAlerts:
@MrNobodyFeb 19.2008 — The quotes probably don't matter -- that's just the way I like to do things. The real change was in the [B]onclick[/B] anonymous event handler content. If that doesn't work, then your IE is blocking it.
×

Success!

Help @oo7ml 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.14,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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