Click to See Complete Forum and Search --> : Javascript Close Problem.


mulgravia
07-25-2003, 02:27 PM
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(':confused:')

Nevermore
07-25-2003, 02:29 PM
Try window.close() instead of top.close().

mulgravia
07-25-2003, 02:40 PM
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.

Originally posted by cijori
Try window.close() instead of top.close().

David Harrison
07-25-2003, 02:45 PM
Have you tried using:

<a href="#" onclick="window.close();return false;">Close Window</a>

pyro
07-25-2003, 03:24 PM
Originally posted by mulgravia
I have some idea that it is somthing to do with Javasoft on my PC - is this possible.Check to make sure javascript is enabled in your browser:

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

Then, make sure javascript is enabled for Navigator.

mulgravia
07-26-2003, 03:14 AM
I had already checked that - checked again and it is enabled.

Thank's
Art :(

Originally posted by pyro
Check to make sure javascript is enabled in your browser:

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

Then, make sure javascript is enabled for Navigator.

mulgravia
07-26-2003, 03:24 AM
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


Originally posted by lavalamp
Have you tried using:

<a href="#" onclick="window.close();return false;">Close Window</a>

David Harrison
07-26-2003, 12:55 PM
Well I've got Netscape 7.1, so if you upload it I'll check to see if it works on my version.

mulgravia
07-27-2003, 05:27 AM
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.


Originally posted by lavalamp
Well I've got Netscape 7.1, so if you upload it I'll check to see if it works on my version.

David Harrison
07-27-2003, 04:32 PM
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.

mulgravia
07-28-2003, 02:10 AM
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.







Originally posted by lavalamp
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. :p

manual
07-28-2003, 05:14 AM
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

mulgravia
07-28-2003, 07:38 AM
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.


Originally posted by manual
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

mulgravia
07-28-2003, 01:29 PM
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.
:D :)

Nevermore
07-28-2003, 01:36 PM
Glad it works. And welll done for fixing it!
:)