/    Sign up×
Community /Pin to ProfileBookmark

Javascript Close Problem.

Hi,
This is my first post – looks cosy here.

Can anyone help me with this small script. I am a complete novice.

It did work one time, and still does with Internet explorer.

I normally use Netscape 7.1. And it does nothing when clicked except the progress bar moves to the end and stops.

I use it to close a page that I use for links on my PC only.

<td valign=”top”><a href=”javascript:top.close()”>Close Window</a>

javascript:smilie(‘?’)

to post a comment
JavaScript

14 Comments(s)

Copy linkTweet thisAlerts:
@NevermoreJul 25.2003 — Try window.close() instead of top.close().
Copy linkTweet thisAlerts:
@mulgraviaauthorJul 25.2003 — Hi,

I have tried that previously and it did not work, I tried it again as you suggested and no it still won't work.

Sigh

I have some idea that it is somthing to do with Javasoft on my PC - is this possible.

Art.

[i]Originally posted by cijori [/i]

[B]Try window.close() instead of top.close(). [/B][/QUOTE]
Copy linkTweet thisAlerts:
@David_HarrisonJul 25.2003 — Have you tried using:

<a href="#" onclick="window.close();return false;">Close Window</a>
Copy linkTweet thisAlerts:
@pyroJul 25.2003 — [i]Originally posted by mulgravia [/i]

[B]I have some idea that it is somthing to do with Javasoft on my PC - is this possible.[/B][/QUOTE]
Check to make sure javascript is enabled in your browser:

Edit -> Preferences -> Advanced -> Scripting and Plugins

Then, make sure javascript is enabled for Navigator.
Copy linkTweet thisAlerts:
@mulgraviaauthorJul 26.2003 — I had already checked that - checked again and it is enabled.

Thank's

Art ?

[i]Originally posted by pyro [/i]

[B]Check to make sure javascript is enabled in your browser:



Edit -> Preferences -> Advanced -> Scripting and Plugins



Then, make sure javascript is enabled for Navigator. [/B]
[/QUOTE]
Copy linkTweet thisAlerts:
@mulgraviaauthorJul 26.2003 — Hi,

Tried it but makes no difference.

Just like my original - it works with IE 5 but not with Netscape 7.1

Thanks

Art.

UK


[i]Originally posted by lavalamp [/i]

[B]Have you tried using:



<a href="#" onclick="window.close();return false;">Close Window</a> [/B]
[/QUOTE]
Copy linkTweet thisAlerts:
@David_HarrisonJul 26.2003 — Well I've got Netscape 7.1, so if you upload it I'll check to see if it works on my version.
Copy linkTweet thisAlerts:
@mulgraviaauthorJul 27.2003 — Hi Lavalamp

Thanks for your help, but I am not sure what you are asking me to do when you say "upload it". Upload to where ??

Here is the script, but it would have to go into a HTML Page of course to check it.

<a href="javascript:top.close()">Close Window</a>

I know it does work with Netscape 7.1, because it was working originally. then stopped for no apparent reason.

I am English too, a "Geordie" living in Tyneside, where are you ?

Regards

Art.


[i]Originally posted by lavalamp [/i]

[B]Well I've got Netscape 7.1, so if you upload it I'll check to see if it works on my version. [/B][/QUOTE]
Copy linkTweet thisAlerts:
@David_HarrisonJul 27.2003 — I live in Manchester so by definition I'm a football hooligan thug.

By upload I mean either copy and paste the code for your page into a new post or save your source as a .txt and attach it to I post (I'd prefer that one).

When you get something from the internet and put it on your computer, that's called downloading, so when you do it the other way it's called uploading.
Copy linkTweet thisAlerts:
@mulgraviaauthorJul 28.2003 — Hi,

I know what download and upload means - I built my own website. My source contains 35 pages and 6 folders, containing private information (inluding on-line banking) which I use on my PC as a link directory file. So as you see I cannot upload any pages.

As it is now proven that, there is nothing wrong with my script, it works with Internet Explorer, so the problem must be with Netscape and/or Javascript itself.

Thank's for the help anyway,

Art.







[i]Originally posted by lavalamp [/i]

[B]I live in Manchester so by definition I'm a football hooligan thug.

By upload I mean either copy and paste the code for your page into a new post or save your source as a .txt and attach it to I post (I'd prefer that one).



When you get something from the internet and put it on your computer, that's called downloading, so when you do it the other way it's called uploading. [/B]
[/QUOTE]
:p
Copy linkTweet thisAlerts:
@manualJul 28.2003 — Try the following, I have netscape 7.0 and it works fine, as well as in IE 6.0 ...

<a href="javascript:window.close()">Close Window</a>

Hope it helps (and works):p
Copy linkTweet thisAlerts:
@mulgraviaauthorJul 28.2003 — Hi,

The script you suggested is the same as my original.

As I said, I don't think that is is my script but something else.

I have ruled out a virus too.

Thank's for your interest.

Art.


[i]Originally posted by manual [/i]

[B]Try the following, I have netscape 7.0 and it works fine, as well as in IE 6.0 ...



<a href="javascript:window.close()">Close Window</a>



Hope it helps (and works):p [/B]
[/QUOTE]
Copy linkTweet thisAlerts:
@mulgraviaauthorJul 28.2003 — Thank you..........

To all of you who offered help and advice with my JavaScript "Window Close" problem, which is now rectified.

Because all the script recommendations were similar to my original, I figured the problem must be elsewhere, so I hit on Netscape 7.01 which I reloaded from the CD, on top of the existing installation and thankfully it is now fixed.

The problem appears to have been that JavaScript was either not properly installed or it was corrupted.

I hope this may be of help to anyone else who may experience the same problem.

Thank you all once again

Art.

UK.

? ?
Copy linkTweet thisAlerts:
@NevermoreJul 28.2003 — Glad it works. And welll done for fixing it!

?
×

Success!

Help @mulgravia 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.15,
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,
)...