Close a page without message

B

BobL

I’m trying this one again with the new information I’ve gathered:

I have a web site that includes 80 pictures and music. I’ve divided the
pictures into five pages of 16 thumbnails each. The viewer can click on any
thumbnail and pop up a larger picture. I also have music running in the
background. To keep the music from stopping as the viewer moves from page to
page, I have all the picture pages running in a frame. It all works
perfectly except – the only way I have found to close the large picture is to
have the viewer click their browser’s BACK button.

I can make each large picture a separate page that closes when it is
clicked, but this opens a “The program is trying to close this page. Do you
want to close this window? Yes-No.†message. Is there any way to keep this
message from coming up? If this were Access, I would add ‘SendKeys
“{Enter}â€â€™ but I can’t find a way to add this to the HTML. I’ve been trying
things in javascript but no luck.

Any suggestions?

Bob
 
T

Trevor L.

BobL said:
I’m trying this one again with the new information I’ve gathered:

I have a web site that includes 80 pictures and music. I’ve divided
the pictures into five pages of 16 thumbnails each. The viewer can
click on any thumbnail and pop up a larger picture. I also have
music running in the background. To keep the music from stopping as
the viewer moves from page to page, I have all the picture pages
running in a frame. It all works perfectly except – the only way I
have found to close the large picture is to have the viewer click
their browser’s BACK button.

I can make each large picture a separate page that closes when it is
clicked, but this opens a “The program is trying to close this page.
Do you want to close this window? Yes-No.†message. Is there any way
to keep this message from coming up? If this were Access, I would
add ‘SendKeys “{Enter}â€â€™ but I can’t find a way to add this to the
HTML. I’ve been trying things in javascript but no luck.

Any suggestions?

Bob

Hi again BobL

No.

Well not quite - there is a workaround inIE6, which will be removed in IE7
as it is non-standard.

That is in the JS, use
onclick="window.opener=self; window.close()"
(I think, I haven't chekced the syntax)
 
T

Trevor L.

Steve said:
Me thinks your speel chacker is catawampus!!
( but your syntax looks good )

Thanks, Steve.

I have noticed for quite a while that automatic spell check in IE6 no longer
works when I reply to newsgroups (possibly also to ordinary email as well).

It is a drag to have to manually select all and then invoke spell check.
(Sure only a few keystrokes, but a few that I don't always make)

If (OT) you may know why this is so, then I would be grateful.

BTW, comment accepted in the spirit given :))
 
B

BobL

Boys, boys

Stop quibbling over a missing or errant spell chacker and keep the good code
coming. Tried it, it works. Most people have IE6 or less so for right now –
I’m in.

Except – now I have to create 80 pages, each with one graphic and one line
of code. And then reset the OnClick for each of the Thumbnails. Oh well. I
hope the “Society†appreciates it.

Bob


Trevor L. said:
Steve said:
Me thinks your speel chacker is catawampus!!
( but your syntax looks good )

Thanks, Steve.

I have noticed for quite a while that automatic spell check in IE6 no longer
works when I reply to newsgroups (possibly also to ordinary email as well).

It is a drag to have to manually select all and then invoke spell check.
(Sure only a few keystrokes, but a few that I don't always make)

If (OT) you may know why this is so, then I would be grateful.

BTW, comment accepted in the spirit given :))
--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
 
B

BobL

Trevor et al:

I thought we were doing fine. I created a page with the large pic and both
the "window.close()" by it self and the same with "windows.opener=self"
worked fine. But, when I put the page in the frame, neither worked. So,
back to the drawing board.

Bob

p.s. Any idea why the "Notify me of replies" check box below this doesn't
work for me?
 
R

Rob Giordano \(Crash\)

| p.s. Any idea why the "Notify me of replies" check box below this doesn't
| work for me?


Probably because the web interface for Usenet is buggy. Most of us don't use
it to read the newsgroups, I'm reading this with Outlook Express which has a
news reader, but there are other readers as well.
 
T

Trevor L.

BobL said:
Trevor et al:

Re the stuff about spell checkers etc - it was just light-hearted banter
I thought we were doing fine. I created a page with the large pic
and both the "window.close()" by it self and the same with
"windows.opener=self" worked fine. But, when I put the page in the
frame, neither worked. So, back to the drawing board.

I assume this is a typo and you did use:
onclick = "window.opener=self; window.close()"
not:
onclick = "windows.opener=self; window.close()"

But I would have to think about why it doesn't work in a frame. There are
others on this NG who know why frames are a "bad thing" and probably know
more about how they work than I do. In fact, I used frames for quite a while
and didn't find too much trouble, but I wasn't worried about whether search
engines could find my site (it was only a family site).
 
R

Ronx

In a frames page, I would use onclick="history.go(-1)" which emulates the
browser back button. Closing the Frames window will not get you back to
the previous page , since the window it opens in has just been closed....
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.
FrontPage Support: http://www.frontpagemvps.com/

Trevor L. said:
BobL said:
Trevor et al:

Re the stuff about spell checkers etc - it was just light-hearted banter
I thought we were doing fine. I created a page with the large pic
and both the "window.close()" by it self and the same with
"windows.opener=self" worked fine. But, when I put the page in the
frame, neither worked. So, back to the drawing board.

I assume this is a typo and you did use:
onclick = "window.opener=self; window.close()"
not:
onclick = "windows.opener=self; window.close()"

But I would have to think about why it doesn't work in a frame. There are
others on this NG who know why frames are a "bad thing" and probably know
more about how they work than I do. In fact, I used frames for quite a
while and didn't find too much trouble, but I wasn't worried about
whether search engines could find my site (it was only a family site).
--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
 
B

BobL

Thank you very much -- this one worked like a charm.
Is it possible to find a web page or book that has all of these wonderful
code lines neatly ordered and described?

Ronx said:
In a frames page, I would use onclick="history.go(-1)" which emulates the
browser back button. Closing the Frames window will not get you back to
the previous page , since the window it opens in has just been closed....
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.
FrontPage Support: http://www.frontpagemvps.com/

Trevor L. said:
BobL said:
Trevor et al:

Re the stuff about spell checkers etc - it was just light-hearted banter
I thought we were doing fine. I created a page with the large pic
and both the "window.close()" by it self and the same with
"windows.opener=self" worked fine. But, when I put the page in the
frame, neither worked. So, back to the drawing board.

I assume this is a typo and you did use:
onclick = "window.opener=self; window.close()"
not:
onclick = "windows.opener=self; window.close()"

But I would have to think about why it doesn't work in a frame. There are
others on this NG who know why frames are a "bad thing" and probably know
more about how they work than I do. In fact, I used frames for quite a
while and didn't find too much trouble, but I wasn't worried about
whether search engines could find my site (it was only a family site).
--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
 
S

Steve Easton

Outlook Express > Tools > Options > Spelling Tab.
Make sure both boxes are checked under Settings.


--
Steve Easton
Microsoft MVP FrontPage
FP Cleaner
http://www.95isalive.com/fixes/fpclean.htm
Hit Me FP
http://www.95isalive.com/fixes/HitMeFP.htm


Trevor L. said:
Steve said:
Me thinks your speel chacker is catawampus!!
( but your syntax looks good )

Thanks, Steve.

I have noticed for quite a while that automatic spell check in IE6 no longer works when
I reply to newsgroups (possibly also to ordinary email as well).

It is a drag to have to manually select all and then invoke spell check. (Sure only a
few keystrokes, but a few that I don't always make)

If (OT) you may know why this is so, then I would be grateful.

BTW, comment accepted in the spirit given :))
--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
 
M

Murray

Any book on HTML is a good place to start.

--
Murray
--------------
MVP FrontPage


BobL said:
Thank you very much -- this one worked like a charm.
Is it possible to find a web page or book that has all of these wonderful
code lines neatly ordered and described?

Ronx said:
In a frames page, I would use onclick="history.go(-1)" which emulates
the
browser back button. Closing the Frames window will not get you back to
the previous page , since the window it opens in has just been closed....
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.
FrontPage Support: http://www.frontpagemvps.com/

Trevor L. said:
BobL wrote:
Trevor et al:

Re the stuff about spell checkers etc - it was just light-hearted
banter

I thought we were doing fine. I created a page with the large pic
and both the "window.close()" by it self and the same with
"windows.opener=self" worked fine. But, when I put the page in the
frame, neither worked. So, back to the drawing board.

I assume this is a typo and you did use:
onclick = "window.opener=self; window.close()"
not:
onclick = "windows.opener=self; window.close()"

But I would have to think about why it doesn't work in a frame. There
are
others on this NG who know why frames are a "bad thing" and probably
know
more about how they work than I do. In fact, I used frames for quite a
while and didn't find too much trouble, but I wasn't worried about
whether search engines could find my site (it was only a family site).
--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top