PC Review


Reply
Thread Tools Rate Thread

Close Window scrip

 
 
Teriel9
Guest
Posts: n/a
 
      26th Nov 2006
I have included a "Close window" script on a customers web site
http://www.gundogs-wales.co.uk/argo.htm
On my computer it closes the window and returns to the previous page but on
2 of my customers computers it brings up a message "Internet Explorer is
trying to close" etc and when yes is selected it closes down the whole site.
Is there a setting in IE that is causing this or something in the online
website.
Thanks in advance
Teriel9


 
Reply With Quote
 
 
 
 
Ronx
Guest
Posts: n/a
 
      26th Nov 2006
IE7 will always show a warning when closing a window using JavaScript.
In the case of your customers, it sounds like they only have one window
or tab open - so closing it will close the whole site. How do they get
to this page - through a link on your site (check target properties) or
through a shortcut, Favourites, Bookmarks or direct link from a search
engine or other site?
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.
FrontPage Support: http://www.frontpagemvps.com/
http://www.rxs-enterprises.org/fp



"Teriel9" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed):

> I have included a "Close window" script on a customers web site
> http://www.gundogs-wales.co.uk/argo.htm
> On my computer it closes the window and returns to the previous page but on
> 2 of my customers computers it brings up a message "Internet Explorer is
> trying to close" etc and when yes is selected it closes down the whole site.
> Is there a setting in IE that is causing this or something in the online
> website.
> Thanks in advance
> Teriel9


 
Reply With Quote
 
Teriel9
Guest
Posts: n/a
 
      26th Nov 2006
Hi Ron,
Many thanks for your very prompt respone.
Customer using IE6 and AOL respectively.
They arrive at this page using a hyperlink from a picture on the main Stud
dogs page http://www.gundogs-wales.co.uk/dogsatstud.htm so they should have
the main page still open.
What foxes me is that with my IE6 it functions correctly
Settings for hyperlink are with "Blank" selected.
I suppose a workaround would be to remove the "Close window" script and just
leave the user to close with thier browser if this is going to happen to
other users.
Regards
Teriel9

"Ronx" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> IE7 will always show a warning when closing a window using JavaScript.
> In the case of your customers, it sounds like they only have one window or
> tab open - so closing it will close the whole site. How do they get to
> this page - through a link on your site (check target properties) or
> through a shortcut, Favourites, Bookmarks or direct link from a search
> engine or other site?
> --
> Ron Symonds - Microsoft MVP (FrontPage)
> Reply only to group - emails will be deleted unread.
> FrontPage Support: http://www.frontpagemvps.com/
> http://www.rxs-enterprises.org/fp
>
>
>
> "Teriel9" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed):
>
>> I have included a "Close window" script on a customers web site
>> http://www.gundogs-wales.co.uk/argo.htm
>> On my computer it closes the window and returns to the previous page but
>> on
>> 2 of my customers computers it brings up a message "Internet Explorer is
>> trying to close" etc and when yes is selected it closes down the whole
>> site.
>> Is there a setting in IE that is causing this or something in the online
>> website.
>> Thanks in advance
>> Teriel9

>



 
Reply With Quote
 
Ronx
Guest
Posts: n/a
 
      26th Nov 2006
I do not see anything wrong in any of the pages, the new pages open as
new tabs in IE7 (that's how I have configured them), and the javascript
closes the tab.

Try opening the pages in a named window -
<a href="newpage.htm" target="windowname">newpage</a>

Then, in the newpage.htm, use the script

<script type="text/javascript">
if ((window.name == "windowname") {
document.write("<a href='javascript:window.close()'>Close this
window</a>");
}
</script>

This will write out the close window link if the page has been opened
from your link, but not if opened by any other means.
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.
FrontPage Support: http://www.frontpagemvps.com/
http://www.rxs-enterprises.org/fp



"Teriel9" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed):

> Hi Ron,
> Many thanks for your very prompt respone.
> Customer using IE6 and AOL respectively.
> They arrive at this page using a hyperlink from a picture on the main Stud
> dogs page http://www.gundogs-wales.co.uk/dogsatstud.htm so they should have
> the main page still open.
> What foxes me is that with my IE6 it functions correctly
> Settings for hyperlink are with "Blank" selected.
> I suppose a workaround would be to remove the "Close window" script and just
> leave the user to close with thier browser if this is going to happen to
> other users.
> Regards
> Teriel9
>
> "Ronx" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > IE7 will always show a warning when closing a window using JavaScript.
> > In the case of your customers, it sounds like they only have one window or
> > tab open - so closing it will close the whole site. How do they get to
> > this page - through a link on your site (check target properties) or
> > through a shortcut, Favourites, Bookmarks or direct link from a search
> > engine or other site?
> > --
> > Ron Symonds - Microsoft MVP (FrontPage)
> > Reply only to group - emails will be deleted unread.
> > FrontPage Support: http://www.frontpagemvps.com/
> > http://www.rxs-enterprises.org/fp
> >
> >
> >
> > "Teriel9" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed):
> >
> >> I have included a "Close window" script on a customers web site
> >> http://www.gundogs-wales.co.uk/argo.htm
> >> On my computer it closes the window and returns to the previous page but
> >> on
> >> 2 of my customers computers it brings up a message "Internet Explorer is
> >> trying to close" etc and when yes is selected it closes down the whole
> >> site.
> >> Is there a setting in IE that is causing this or something in the online
> >> website.
> >> Thanks in advance
> >> Teriel9

> >


 
Reply With Quote
 
Teriel9
Guest
Posts: n/a
 
      27th Nov 2006
Hi Ron,
Thank you for your very informative reply.
I will try your solution
Rgds
Teriel9

"Ronx" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I do not see anything wrong in any of the pages, the new pages open as new
>tabs in IE7 (that's how I have configured them), and the javascript closes
>the tab.
>
> Try opening the pages in a named window -
> <a href="newpage.htm" target="windowname">newpage</a>
>
> Then, in the newpage.htm, use the script
>
> <script type="text/javascript">
> if ((window.name == "windowname") {
> document.write("<a href='javascript:window.close()'>Close this
> window</a>");
> }
> </script>
>
> This will write out the close window link if the page has been opened from
> your link, but not if opened by any other means.
> --
> Ron Symonds - Microsoft MVP (FrontPage)
> Reply only to group - emails will be deleted unread.
> FrontPage Support: http://www.frontpagemvps.com/
> http://www.rxs-enterprises.org/fp
>
>
>
> "Teriel9" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed):
>
>> Hi Ron,
>> Many thanks for your very prompt respone.
>> Customer using IE6 and AOL respectively.
>> They arrive at this page using a hyperlink from a picture on the main
>> Stud
>> dogs page http://www.gundogs-wales.co.uk/dogsatstud.htm so they should
>> have
>> the main page still open.
>> What foxes me is that with my IE6 it functions correctly
>> Settings for hyperlink are with "Blank" selected.
>> I suppose a workaround would be to remove the "Close window" script and
>> just
>> leave the user to close with thier browser if this is going to happen to
>> other users.
>> Regards
>> Teriel9
>>
>> "Ronx" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > IE7 will always show a warning when closing a window using JavaScript.
>> > In the case of your customers, it sounds like they only have one window
>> > or
>> > tab open - so closing it will close the whole site. How do they get to
>> > this page - through a link on your site (check target properties) or
>> > through a shortcut, Favourites, Bookmarks or direct link from a search
>> > engine or other site?
>> > --
>> > Ron Symonds - Microsoft MVP (FrontPage)
>> > Reply only to group - emails will be deleted unread.
>> > FrontPage Support: http://www.frontpagemvps.com/
>> > http://www.rxs-enterprises.org/fp
>> >
>> >
>> >
>> > "Teriel9" <(E-Mail Removed)> wrote in message
>> > news:(E-Mail Removed):
>> >
>> >> I have included a "Close window" script on a customers web site
>> >> http://www.gundogs-wales.co.uk/argo.htm
>> >> On my computer it closes the window and returns to the previous page
>> >> but
>> >> on
>> >> 2 of my customers computers it brings up a message "Internet Explorer
>> >> is
>> >> trying to close" etc and when yes is selected it closes down the whole
>> >> site.
>> >> Is there a setting in IE that is causing this or something in the
>> >> online
>> >> website.
>> >> Thanks in advance
>> >> Teriel9
>> >

>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
popup window close to submit opener window without 'causes validation' happening Matt Jensen Microsoft ASP .NET 1 16th Dec 2005 03:16 PM
Pop Up windows close automatically and close all ie browser window =?Utf-8?B?Q3JhenlTaGl0?= Windows XP Internet Explorer 1 22nd Feb 2005 01:08 AM
annoying window pops up every time I close IE6 browser window John Lynch Windows XP Internet Explorer 1 23rd Jun 2004 04:44 AM
Smart Client - Want to close the stub window when child window is closed Stone Microsoft Dot NET Framework Forms 0 28th Apr 2004 09:12 PM
Can Not window.close() to Close a New Window After Submitting to It Chan Windows XP Internet Explorer 0 8th Oct 2003 08:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:36 PM.