473,406 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

clarification: dhtml and closing the browser window



thanks to all that replyied to my previous post with the following code
in question:

<a href="merc.htm" target="_new_merc" onfocusout=window.close
class="left_link">

i understand that the people don't like the idea of closing the browser
window because it's annoyance to the user

however in my code it is *me* who opens the target window for the
specific purpose of viewing it only once. when the user leaves the
window I want it closed. It seems to me that the "target" attribute of
<a> tag is even more annoying without closing the "_new" window: say
the user went out about their business and in 10 minutes they click the
link again and *nothing* happens because the "_new" window is open but
without focus and the novice user wouldn't know what's going on.

the issue in question is that "onfocusout" seems to be microsoft
extension and not part of the standad HTML

udnder

http://www.w3.org/TR/REC-html40/inte....html#h-18.2.3

there is no "onfocusout" event

but uunder

http://msdn.microsoft.com/library/de...ence_entry.asp

there is "onfocusout"
So I am not clear on the following

1. Is dhtml a microsoft extension of html?

2. why wouldn't my code work in IE even if it is?

Nov 9 '05 #1
4 2043
Els
bb***@hotmail.com wrote:
thanks to all that replyied to my previous post with the following code
in question:
Please don't start a new thread when it's about the same subject
still, and please quote the relevant parts of the message you are
replying to.
This is easy to, even when using Google Groups:
http://www.safalra.com/special/googlegroupsreply/
<a href="merc.htm" target="_new_merc" onfocusout=window.close
class="left_link">

i understand that the people don't like the idea of closing the browser
window because it's annoyance to the user
Correct.
however in my code it is *me* who opens the target window for the
specific purpose of viewing it only once. when the user leaves the
window I want it closed. It seems to me that the "target" attribute of
<a> tag is even more annoying without closing the "_new" window: say
the user went out about their business and in 10 minutes they click the
link again and *nothing* happens because the "_new" window is open but
without focus and the novice user wouldn't know what's going on.
Yes, that is indeed an annoyance. But I know that there is a good
solution for that. I don't know how, but I do know some sites open
popups that get reused, and upon reusing the same popup window, it is
brought to the front, with focus. I think you'd better explore that
option instead, which eliminates your initial problem I think.

Of course, the best option altogether, is to avoid popup windows. Just
let the new page load in the current window, so that users can use
their backspace button to go back to where they were.
So I am not clear on the following

1. Is dhtml a microsoft extension of html?

2. why wouldn't my code work in IE even if it is?


Sorry, I have no idea whatsoever.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Nov 9 '05 #2
On 9 Nov 2005 00:31:05 -0800, bb***@hotmail.com wrote:
i understand that the people don't like the idea of closing the browser
window because it's annoyance to the user

however in my code it is *me* who opens the target window for the
specific purpose of viewing it only once. when the user leaves the
window I want it closed.
So are you saying that the convenience of the user is unimportant to
you? If not, what?

If the focus switches before the user has read the window in question,
does it matter that (s)he never gets to see it? If not, why display the
window at all? If so, it doesn't make sense to close it, does it?
It seems to me that the "target" attribute of
<a> tag is even more annoying without closing the "_new" window: say
the user went out about their business and in 10 minutes they click the
link again and *nothing* happens because the "_new" window is open but
without focus and the novice user wouldn't know what's going on.
Agreed. (I would add that the experienced user may well not know what is
going on either.) That is one reason for not using the target attribute.
Though if you combine it with some well-thought-out Javascript you can
at least avoid that issue for many readers.

I would say that you should only use the target attribute if you have
good reasons for supposing that most readers will prefer to see both the
old and new windows at the same time - something like a glossary for
example. And in that case you certainly shouldn't be closing one of the
windows unasked.

So I am not clear on the following

1. Is dhtml a microsoft extension of html?
DHTML doesn't really exist. It's a marketing slogan covering the
combination HTML + Javascript + DOM.
2. why wouldn't my code work in IE even if it is?


Don't you want it to work in a browser?

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Nov 9 '05 #3
bb***@hotmail.com wrote :

thanks to all that replyied to my previous post
Where is your other post?
Is it in another newsgroup?
Where exactly do you want to see replies to your post?
Wasn't it more simpler to just post all your questions into a single
thread? Why make things more complicated for people reading your posts
and trying to bring you assistance?
Is there a particular reason as to why you want to fragment the
discussion on your posts?
Or is it that you want to read certain answers to a post somewhere and
want to read another type of answers to your post in another unrelated
thread?

with the following code in question:

<a href="merc.htm" target="_new_merc" onfocusout=window.close
class="left_link">

i understand that the people don't like the idea of closing the browser
window because it's annoyance to the user

Just imagine: would you like NBC, CBS or ABC to close your tv just
because you switch to another channel? Would you like NBC, CBS or ABC to
turn off your working washing machine because its noise can interfere
with the listening of their NBC/CBS/ABC tv show going on in your tv?
however in my code it is *me* who opens the target window for the
specific purpose of viewing it only once.
Are you actually implying or suggesting that only *_you_* should be able
to open windows and close windows on an user screen regardless of what
such user would or could have to say about your own manners?
when the user leaves the
window I want it closed.
Then it should be the same for NBC, CBS and ABC: they should be able to
turn off your tv set when you switched your tv to a competitor channel.
Some of them should have agreements with Sony, Toshiba, JVC, and other
TV manufacturers to implement such feature on an automatic mode.

It seems to me that the "target" attribute of <a> tag is even more annoying without closing the "_new" window:
I don't know if others told you so already
(see what happens: either I don't know or I'm repeating again something
that you were told already ... all because you intentionally fragmented
the discussion into separate threads) but you can not have a target
attribute value starting with "_" unless when using the reserved
keywords for this.

target="_new" or target="_new_merc" are invalid markup code

http://www.w3.org/TR/html401/types.h...e-frame-target

say
the user went out about their business and in 10 minutes they click the
link again and *nothing* happens because the "_new" window is open but
without focus and the novice user wouldn't know what's going on.
What you're describing is the nr 1 usability problem with requested
popup windows. What you're describing is a very well known problem with
the windowing management system of most os-es.

There is nothing you can do to prevent this when javascript support is
disabled or inexistent. If javascript support is enabled, then you can
use the focus() method after proper testing when the window loses focus.

the issue in question is that "onfocusout" seems to be microsoft
extension and not part of the standad HTML

udnder

http://www.w3.org/TR/REC-html40/inte....html#h-18.2.3

there is no "onfocusout" event

but uunder

http://msdn.microsoft.com/library/de...ence_entry.asp

there is "onfocusout"
So I am not clear on the following

1. Is dhtml a microsoft extension of html?
No.
2. why wouldn't my code work in IE even if it is?


Maybe because MSIE supports proprietary extensions and IE-specific code
which has nothing to do with W3C web standards.
And maybe because the window object is not defined as a W3C DOM object
nor as a HTML object to begin with: the window object is a DOM 0 object.
Where you told and explained all this in your other thread?

Gérard
--
remove blah to email me
Nov 9 '05 #4
Stephen Poley wrote :
On 9 Nov 2005 00:31:05 -0800, bb***@hotmail.com wrote:
It seems to me that the "target" attribute of
<a> tag is even more annoying without closing the "_new" window: say
the user went out about their business and in 10 minutes they click the
link again and *nothing* happens because the "_new" window is open but
without focus and the novice user wouldn't know what's going on.

Agreed. (I would add that the experienced user may well not know what is
going on either.)


Well, it depends if WCAG/WAI recommendations, usability recommendations
have been followed too.

"Users often don't notice that a new window has opened, especially if
they are using a small monitor where the windows are maximized to fill
up the screen. So a user who tries to return to the origin will be
confused by a grayed out Back button."
The Top Ten New Mistakes of Web Design: 2. Opening New Browser Windows,
Jakob Nielsen, May 1999
http://www.useit.com/alertbox/990530.html

"If your link spawns a new window, or causes another windows to 'pop up'
on your display, or move the focus of the system to a new FRAME or
Window, then the nice thing to do is to tell the user that something
like that will happen."
World Wide Web Consortium Accessibility Initiative regarding popups
http://www.w3.org/WAI/wcag-curric/sam77-0.htm

"Use link titles to provide users with a preview of where each link will
take them, before they have clicked on it."
Ten Good Deeds in Web Design, Jakob Nielsen, October 1999
http://www.useit.com/alertbox/991003.html

Using Link Titles to Help Users Predict Where They Are Going, Jakob
Nielsen, January 1998
http://www.useit.com/alertbox/980111.html

More on this:
http://developer.mozilla.org/en/docs...ese_guidelines
That is one reason for not using the target attribute.
Though if you combine it with some well-thought-out Javascript you can
at least avoid that issue for many readers.

I would say that you should only use the target attribute if you have
good reasons for supposing that most readers will prefer to see both the
old and new windows at the same time - something like a glossary for
example.


In such case, the use of target attribute for users with js disabled
makes sense.

Gérard
--
remove blah to email me
Nov 9 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: egg | last post by:
Dear Sir/Madam, I'm about to start a project, the idea is to have a web interface to let user specify the URL of a target HTML document, based on that URL, retrieved and parsed the HTML document...
2
by: Derek | last post by:
Hello: I want to capture the event when a browser is closing, to give to the user the posibility of close or no this browser. When the browser is closing, this show a confirm window with two...
6
by: gsb | last post by:
Don't know if this is the right place to post this JavaScript issue. If not, could someone point me in the right direction please. I am trying to make a "cross browser compliant" floating...
1
by: Chirag Malvi | last post by:
hello all, I am developing the web application using ASP.net and VS.2003 IDE. here is the situation which i want to implement. 1) User is browsing some webform. I want to trap this event....
1
by: Bob T | last post by:
Hi All, I am a bit of a newbie but have a reasonable grasp of using ASP.net code. One thing I have wanted to find our for sometime is if there is a way to invoke DHTML methods from or after...
7
by: Rich | last post by:
I have the following script on all pop up windows, would like to have this work on all newer browsers if possible. Right now it only works on MSIE & Opera. Not sure why. Any suggestions are...
1
by: karthik juneni | last post by:
Hi all, Iam trying to capture windows closing event (i.e) when the user clicks on the "X" button i want to capture that event and want to update some values in the database.I tried two methods...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.