473,396 Members | 1,996 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,396 software developers and data experts.

Replace Contextmenu with new menu

Hi all,

I did make a script/css thing to replace the contextmenu on the website with
a new one: http://www.djwice.com/contextmenu.html

It works nice in MSIE, but on Netscape (and probable other browsers) it
stays on the same place (does not "open'' where the mouse is). And the links
do not work when you click on them.

If anyone has sugestions on how to improve it, please let me know.

Thanks,
Wouter
Jul 20 '05 #1
46 6855
DJ WIce wrote:
Hi all,

I did make a script/css thing to replace the contextmenu on the website with
a new one: http://www.djwice.com/contextmenu.html

It works nice in MSIE, but on Netscape (and probable other browsers) it
stays on the same place (does not "open'' where the mouse is). And the links
do not work when you click on them.

If anyone has sugestions on how to improve it, please let me know.


Suggestion: Trash it and stop screwing with my mouse.

--
Randy

Jul 20 '05 #2
: Suggestion: Trash it and stop screwing with my mouse.

Sugestion: look at what you see before complaining; click the option on the
bottom of the menu...
And now try to help me solve a problem that is not related with your mouse.
Help me make the code work; the stylesheet does not look equal in all
browsers. NN screws it up.
I just made it to test what's possible, you seem to love staying where you
are?

Wouter
Jul 20 '05 #3
"DJ WIce" <co*********@djwice.com> wrote:
I did make a script/css thing to replace the contextmenu on the website with
a new one: http://www.djwice.com/contextmenu.html

It works nice in MSIE, but on Netscape (and probable other browsers) it
stays on the same place (does not "open'' where the mouse is). And the links
do not work when you click on them.


Which Netscape isn't it working in? It works fine in NN 7.1 and 6.23
(both WinXP).

The page doesn't even load in NN4.8 (hangs), but you weren't actually
expecting anything remotely fancy to work in that were you?

It doesn't work at all in Opera 7.23 (even when I set my preference to
allow JavaScript to access the right mouse click, which I normally
don't allow. Can any Opera users remember whether that's off or on by
default?)

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #4
"DJ WIce" <co*********@djwice.com> writes:
: Suggestion: Trash it and stop screwing with my mouse.

Sugestion: look at what you see before complaining; click the option on the
bottom of the menu...
Didn't see a thing. I use Opera :) Anyway, I did check in IE and
Mozilla ...

Looks nice, but I am also in the camp who things reimplementing the
browser interface is a bad idea. And why do you call it "more nice
looking"? I like the current menu, and it fits my theme.
And now try to help me solve a problem that is not related with your mouse.
Help me make the code work; the stylesheet does not look equal in all
browsers. NN screws it up.


As a bug report, "screws it up" is pretty useless. Which NN are we
talking about (I'm pretty sure it's not Netscape Navigator 4, because
it won't even load the page).

I don't see any serious difference between Mozilla and IE 6 (not one that
would fit "screws it up" at least).

It is optimistic to assume that two browsers show a page exactly
alike. For one thing, the font will probably be different, and IE is
known for its bad CSS implementation. So, if you have any particular
CSS problems, you need to say what it is (and it would be smarter to
ask in a CSS group ... which I only now notice that you do. When
you crosspost, remember to set the Followup-To header!!!)

The color you use for the background, lightgray, is not a standard
CSS color, and is not understood by IE

Neither allows me to pop the menu down again when it is up, except by
chosing an entry.

Don't use javascript:-URIs (like "javascript:window.print()"). Use
onclick attributes instead. <URL:http://jibbering.com/faq/#FAQ4_24>

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #5
Hi Steve,

Since this is a posting in more that one newsgroup I did fix a bit op for
NN.
So the problem now with NN is stylesheet related. I hope you can help:

The buttons do have 2 problems:

1) in MSIE the

<a href="link" style="width:150px;border:1px solid white;"><img
src="image.gif" height="16"> text</a>

works. E.g. the link is 150 pixels in width and has a border around the 16
pixels
height of the image.

Netscape (7) says:
I ignor the width:150px and I do not care how heigh the image is;
I just draw it around the image and the link text but at the text height
(12px).

: Which Netscape isn't it working in? It works fine in NN 7.1 and 6.23
: (both WinXP).
Thanks for testing NN 6.23, I did test it on 7.0 only.

: The page doesn't even load in NN4.8 (hangs), but you weren't actually
: expecting anything remotely fancy to work in that were you?
I do not use layers probable that's the problem, right? NN4.8 does not
handle div tags?
: It doesn't work at all in Opera 7.23 (even when I set my preference to
: allow JavaScript to access the right mouse click, which I normally
: don't allow. Can any Opera users remember whether that's off or on by
: default?)
Hmm.. I assume Opera did not implement the oncontextmenu event.
I need to know how to test if it's implemented or not, then I can handle
those who do not with right-click events.
I need to separate these because Netscape 7 (and maybe lower) gives a
trigger to the click-event at the same time to the oncontextmenu event, MSIE
makes the choice only to trigger the rightclick event when both are active.
Thanks for your reply and testing!
Wouter
Jul 20 '05 #6
On Thu, 15 Jan 2004 23:20:07 +0100, DJ WIce <co*********@djwice.com> wrote:
Help me make the code work; the stylesheet does not look equal in all
browsers. NN screws it up.


In Opera I get the default menu, thank goodness.

Don't know crap about scripting, but thought you'd appreciate a little
extra info.
Jul 20 '05 #7
"DJ WIce" <co*********@djwice.com> wrote:
The buttons do have 2 problems:

1) in MSIE the

<a href="link" style="width:150px;border:1px solid white;"><img
src="image.gif" height="16"> text</a>

works. E.g. the link is 150 pixels in width and has a border around the 16
pixels height of the image.

Netscape (7) says:
I ignor the width:150px and I do not care how heigh the image is;
I just draw it around the image and the link text but at the text height
(12px).
Netscape is applying your styles correctly, IE is not.
You can not set the width property for inline elements, and the height
of an inline element is determined by the line-height property, not by
any images that it may contain. This is already well documented, see
for example: http://www.hut.fi/u/hsivonen/standar...l#lineboxmodel

Adding display: block to the styles for the <a> elements would be a
first step. Other values may need to be tweaked as a consequence.
: The page doesn't even load in NN4.8 (hangs), but you weren't actually
: expecting anything remotely fancy to work in that were you?

I do not use layers probable that's the problem, right? NN4.8 does not
handle div tags?
NN4 handles div tags just fine. It just has a totally different
document object model and so you can't manipulate them, or anything
else for that matter, in the same way as more modern browsers.
: It doesn't work at all in Opera 7.23 (even when I set my preference to
: allow JavaScript to access the right mouse click, which I normally
: don't allow. Can any Opera users remember whether that's off or on by
: default?)

Hmm.. I assume Opera did not implement the oncontextmenu event.
I need to know how to test if it's implemented or not, then I can handle
those who do not with right-click events.


Opera didn't throw up an error message, so I wouldn't bother changing
anything. Most Opera users are happy with the fact that their browser
is less open to interference like this. Leave them happy.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #8
DJ WIce wrote:

I did make a script/css thing to replace the contextmenu on the website with
a new one: http://www.djwice.com/contextmenu.html

If anyone has sugestions on how to improve it, please let me know.


You assume all your visitors are mouse users? The browser's inbuilt
context menus are accessible via keyboard. Yours is not.

BTW, yours is not really a context menu at all, since the menu items
don't change depending on the element (link vs image vs text). Why
would someone prefer using this when the browser context menus are so
much more functional? You are only going to annoy your visitors, you know.

--
To email a reply, remove (dash)un(dash). Mail sent to the un
address is considered spam and automatically deleted.
Jul 20 '05 #9
DJ WIce <co*********@djwice.com> wrote:
If anyone has sugestions on how to improve it, please let me know.


Having the "Disable this" text doesn't make it okay to toy with the user's
browser. What if I wanted to copy and paste? That's not even on your menu.

My menu was made to look good with my browser, not with your site.
--
Michael Wilcox
mjwilco at yahoo dot com
Essential Tools for the Web Developer - http://mikewilcox.t35.com
Jul 20 '05 #10
Steve Pugh <st***@pugh.net> wrote:
You can not set the width property for inline elements, and the height
of an inline element is determined by the line-height property, not by
any images that it may contain. This is already well documented, see
for example: http://www.hut.fi/u/hsivonen/standar...l#lineboxmodel


I understand the "what" of the inline box model: inline elements do not
expand in height to accomodate taller sub-elements (e.g., images, <big>),
among other things.

What I'm missing is the "why" of the inline box model.

Is there documentation of the inline box model that explains the rationale
behind this behavior? The documents I've read (Henri's and Eric's) explain
the "what" of the inline box model well, but not the "why".
--
Darin McGrew, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/

"Men build too many walls and not enough bridges." - Sir Isaac Newton
Jul 20 '05 #11
: You assume all your visitors are mouse users?
No.

: The browser's inbuilt
: context menus are accessible via keyboard. Yours is not.
Thanks for the tip, I'll focus the first link.

: BTW, yours is not really a context menu at all, since the menu items
: don't change depending on the element (link vs image vs text).
Tha's just a temp. problem, after some tips in this group I tried to change
from <a href="javascrip:.."> to <a onclick="..">
But MSIE then does not support hover style. So I did put in the href="#".

: You are only going to annoy your visitors, you know.
I'll try to make it smaller than the original one (no disabled options that
do show) and add icons.
Just an other thing one can design together with the style of their site.
Like most new things it's hard for the first to change :-)

Wouter
Jul 20 '05 #12
: Having the "Disable this" text doesn't make it okay to toy with the user's
: browser. What if I wanted to copy and paste? That's not even on your menu.
I'm now just working on the scripting. And getting it to work like to normal
menu.
When selection is done I can disable the menu, that a nice suggestion!
Thanks.
: My menu was made to look good with my browser, not with your site.
Yeah, and what you are viewing is my site ;-)

Wouter

Jul 20 '05 #13
DJ WIce <co*********@djwice.com> wrote:
I'll try to make it smaller than the original one (no disabled options that
do show) and add icons.


The disabled options are a usability feature. It helps keep the interface
predictable. That's a good thing, BTW.

And how do you know what "the original one" is anyway? It might be

Back
Forward
Rewind
Fast Forward
Stop
Home
--------------------
Reload
Reload every >
--------------------
Add to bookmarks
Copy address
Send link by mail
--------------------
Frame >
Background >
--------------------
Duplicate
Create linked
--------------------
Full Screen

or perhaps

Back
Forward
--------------------
Save Background As...
Set as Wallpaper
Copy Background
Set as Desktop Item...
--------------------
Select All
Paste
--------------------
Create Shortcut
Add to Favorites...
View Source
--------------------
Encoding >
--------------------
Print
Refresh
--------------------
Properties

or perhaps

Insert Personal >
Insert Note >
--------------------
Undo
Redo
--------------------
Cut
Copy
Copy to note
Paste
Delete
--------------------
Clear all
Select all
--------------------
Page >
or perhaps

Cut
Copy
Paste
Select All
Print

or perhaps

Copy text
Copy to note
--------------------
Search
Search with >
Dictionary
Encylopedia
--------------------
Translate >
--------------------
Go to URL
Send by mail

or perhaps something else entirely...
--
Darin McGrew, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/

"Experience is what allows you to recognize a mistake when you make it again."
Jul 20 '05 #14
DJ WIce <co*********@djwice.com> wrote:
I'm now just working on the scripting. And getting it to work like to
normal menu.


What is the point of putting in so much effort into a feature that's already
implemented in browsers?
My menu was made to look good with my browser, not with your site.

Yeah, and what you are viewing is my site ;-)


I came to your site for its content. Your job as an author is to provide
that content in an organized fashion with proper structure, both in your
code and in site navigation. It is *not* your job to alter my browser
preferences or interfere in anyway with the normal operation of my browser.
--
Michael Wilcox
mjwilco at yahoo dot com
Essential Tools for the Web Developer - http://mikewilcox.t35.com
Jul 20 '05 #15
DJ WIce <co*********@djwice.com> wrote:
I'll try to make it smaller than the original one (no disabled
options that do show) and add icons.
Just an other thing one can design together with the style of their
site. Like most new things it's hard for the first to change :-)


First of all, you're not changing it, you're replacing it, and doing a poor
job. Second, if the context menu was meant to accept style suggestions,
there would be a way to do so with simple CSS. Third, you don't know what's
on the user's context menu (it's not the same for all operating systems and
browsers) and you can't replicate the features they're expecting.
--
Michael Wilcox
mjwilco at yahoo dot com
Essential Tools for the Web Developer - http://mikewilcox.t35.com
Jul 20 '05 #16
: First of all, you're not changing it, you're replacing it, and doing a
poor
: job.
That's just a mater of opinion. If I wanted that your opinion on me
replacing the menu, I would have gone to alt.html.critique.

: Second, if the context menu was meant to accept style suggestions,
: there would be a way to do so with simple CSS.
Sorry, this is a non argument. If this argument would hold there would not
have been CSS 2 and worse: you would never ever have phoned your
wife/girlfriend/friends. Simply because a phone was not intended to use it
like that when it was designed.
: Third, you don't know what's on the user's context menu (it's not the same
for all operating systems and
: browsers) and you can't replicate the features they're expecting.
Maybe I can make features that they do not have in that menu?
Maybe this is just a test case for me, testing what is possible?

Do you know MSIE accepts that if you press key x that if tell MSIE that it
was a Q it beleves me?
Code:

document.onkeydown = function(e)
{
if (document.all)
{
var kC = event.keyCode;
switch(kC)
{
case 40 : /* down */; event.keyCode=9; return true;
default : return true;
}
}
}
Now tell me, was that inteded when you pressed the down arrow? That your
browser thinks it's a TAB?
No? Well MSIE accepts it that I define event.keyCode.
By the way do you know how I can do this for Shift+Tab, so I can replace
arrow up?
Wouter
Jul 20 '05 #17
: >> My menu was made to look good with my browser, not with your site.
: > Yeah, and what you are viewing is my site ;-)
:
: I came to your site for its content. Your job as an author is to provide
: that content in an organized fashion with proper structure, both in your
: code and in site navigation.
Yes, and here is a definition part that's your discussion point:

site navigation.

I think that includes all the things you can do with my website.
Your opinion is that your browser interface is perfect.
I'm not always convinced all people would think that after they seen some
new.

Internet was never intended to have banners and commercial advertisements.
But it's the one reason why it still exists in this lange scale; they pay
the high way.
(Even though I don't like them on websites or worse in e-mail).
: It is *not* your job to alter my browser preferences or
: interfere in anyway with the normal operation of my browser.
I know, and I will never do that. If you have a browser that does allow
interfearance.. why do you use it?
You just talked about your browser being exactly like you want it?
Ciao and don't be to angry, don't try to find the sence of it. I'm just
finding the limit of the technological posibilities. Nothing more, nothing
less.
Wouter
Jul 20 '05 #18
: > I'll try to make it smaller than the original one (no disabled options
that
: > do show) and add icons.
:
: And how do you know what "the original one" is anyway? It might be
In all your examples the menu was langer, and mine normally has no icons.

;-) don't take it to hard.
I'm just trying to test the limits of CSS/DHTML I'm not testing what people
like.
That might come after I can simulate the function of the menu with a few
items.
Then I will visit alt.html.critique.

Ciao, ciao,
Wouter
Jul 20 '05 #19
DJ WIce wrote:

<--snip-->

Do you know MSIE accepts that if you press key x that if tell MSIE that it
was a Q it beleves me?
Code:

document.onkeydown = function(e)
{
if (document.all)

<--snip-->

Just a side note, and an FYI one. MSIE is not the only browser that can
pass that test. Opera, in IE spoof mode, and several other browsers
emulate the document.all (pass the test).
if (document.all &! document.layers &! window.opera){
alert('I think you are using MSIE but I could still be wrong')
}

the !window.opera excludes Opera.
the !document.layers excludes a browser (the name eludes me, Jim Ley
named it once for me) that supports both document.all and document.layers.

--
Randy

Jul 20 '05 #20
DJ WIce <co*********@djwice.com> wrote:
I think that includes all the things you can do with my website.
Your opinion is that your browser interface is perfect.
I'm not always convinced all people would think that after they seen
some new.
And once they leave your site, will they ever see your navigation again?
Does it even matter if they like it if they can never use it?
It is *not* your job to alter my browser preferences or
interfere in anyway with the normal operation of my browser.

I know, and I will never do that.


When I right-clicked on your page and saw a menu other than my browser's and
without the features I wanted, then you interfered with my browser.
If you have a browser that does
allow interfearance.. why do you use it?
If, in this case, intereference means JavaScript, than no, I don't allow it.
I turn it off unless I'm testing a page like yours or some site was poorly
designed to require it.

JavaScript, while not necessarily a bad idea, was horribly abused by the
"developers" at Microsoft and by authors who think they should (or even can)
have ultimate control over another's browser.
You just talked about your browser being exactly like you want it?


Yep, that's what Edit > Preferences is for.
--
Michael Wilcox
mjwilco at yahoo dot com
Essential Tools for the Web Developer - http://mikewilcox.t35.com
Jul 20 '05 #21
DJ WIce wrote:
: First of all, you're not changing it, you're replacing it, and doing a
: poor job.
That's just a mater of opinion. If I wanted that your opinion on me
replacing the menu, I would have gone to alt.html.critique.
Here's a heads-up for ya - you'll most likely get roasted in
alt.html.critique for trying to mess with the user's browser. ;)
: you can't replicate the features they're expecting.
Maybe I can make features that they do not have in that menu?
A user is accustomed to having their context menus work the same
regardless of what web site they are on. You are trying to make it
different. This does not help the user at all, but will only confuse or
annoy them.
Maybe this is just a test case for me, testing what is possible?
Just because you can, doesn't mean you should. If you care about your
users, you won't mess around with their UI.
Do you know MSIE accepts that if you press key x that if tell MSIE that it
was a Q it beleves me?


And what if the visitor isn't using IE?

--
To email a reply, remove (dash)un(dash). Mail sent to the un
address is considered spam and automatically deleted.
Jul 20 '05 #22
DJ WIce wrote:

I did make a script/css thing to replace the contextmenu on the website with
a new one: http://www.djwice.com/contextmenu.html
One which fails to work as advertised in Mozilla. "Add to favorites"
does exactly nothing. And how could it, since "favorites" is
Microsoft-specific. So what good is the script?
It works nice in MSIE
....for which it was obviously designed...
but on Netscape (and probable other browsers) it
stays on the same place (does not "open'' where the mouse is).
I'm not sure what you mean. Using Mozilla 1.3/Win2k, the context menu
pops up where the normal one would, and looks all pretty and everything.
And the links do not work when you click on them.
back, forward, refresh, view source, and use standard menu all work in
Mozilla. I didn't try print, so I cannot say what happens with that
one. Add to favorites does not work (as I said above). Neither does
"make home page."

Trying to make HTML a programming interface (target="_new" anyone?) is
fraught with problems. Using javascript as an end run to hijack the
browser is only going to introduce the same issues.
If anyone has sugestions on how to improve it, please let me know.


For Mozilla? You cannot make it fully functional, that's for sure.

The menu looks quite nice, and may have some very elegant code behind
it. But I'm afraid there's no way to improve it for my preferred
browser. And even in MSIE, it's terrible in terms of usability for the
context menu to change from site to site, just like it's terrible for
the fixed menus to change. The best thing you could do for the web is
drop the idea.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #23
"Randy Webb" <hi************@aol.com> wrote in message
news:K-********************@comcast.com...
<snip>
Do you know MSIE accepts that if you press key x that if tell
MSIE that it was a Q it beleves me?
Code:

document.onkeydown = function(e)
{
if (document.all)<--snip-->
Just a side note, and an FYI one. MSIE is not the only browser
that can pass that test. ...

<snip>if (document.all &! document.layers &! window.opera){
alert('I think you are using MSIE but I could still be wrong')
Konqueror 3 (Safari), IceBrowser 5, iCab and NetFront (at least) all
also make it in here. I think that they all support a - keyCode -
property on a global - event - object but I doubt that they will behave
consistently in response to having that - keyCode - property
re-assigned.
}
There are objects for which their existence would currently allow the
inference that the browser in use was IE (5.0+). But given the extent to
which, for example, IceBrowser actively spoofs the IE DOM (global
ActiveXObject constructor, filters collections on elements, etc.) it is
unlikely that any test that attempts to infer the browser make or
version from the existence of objects in its DOM is going to stay valid
for long. Even IE's conditional comments could be implemented by another
browser if they were seen to be being employed as a mechanism to exclude
it from a significant number of sites.

In principal[1] the safe test for the availability of the required
feature would be:-

if((typeof event != 'undefined')&&
(typeof event.keyCode == 'number')){
... // safe to access event.keyCode
}

- but the only way of seeing if assigning a new value to - keyCode - had
the desired result would be to try it and then monitor the browser to
see if it was possible to work out what the result was.
the !window.opera excludes Opera.
the !document.layers excludes a browser (the name eludes me,
Jim Ley named it once for me) that supports both document.all
and document.layers.


It was Omniweb.

Richard.

[1] The principal being: testing the browser for the existence of the
features most closely associated with the code that may be executed if
they exist.
Jul 20 '05 #24
"DJ WIce" <co*********@djwice.com> wrote in message
news:bu**********@news.tudelft.nl...
: First of all, you're not changing it, you're replacing it,
: and doing a poor job. That's just a mater of opinion.
You are (at least attempting to) replace the context menu, so that
cannot be opinion.

You are doing a poor job, because you are failing to replace it at all
on Opera versions (for example). Your replacement can only be an
impoverished version of the original at best because you have no way of
telling what features were in the original and are incapable of
reproducing (at all, or fully) many of the features that you know would
have existed on the context menus of common browsers.
If I wanted that your opinion on me replacing the
menu, I would have gone to alt.html.critique.
If it is scripted and you post it to comp.lang.javascript you are
inviting opinions on how viable/sensible the script is.

<snip>Maybe I can make features that they do not have in that menu?
When a user activates the context menu of their browser it is not a
speculative activity intended to give them the opportunity to see what
new features may have been provided. It is an action taken with the
expectation that a known set of features will be available to them. If
you take any of those features away, or break them with a bad
implementations (and especially the one they intended to use), it
doesn't matter how spectacular what you put in its place may be, the
user will still be frustrated.
Maybe this is just a test case for me, testing what is possible?

<snip>

Then you should want to be told if you are wasting your efforts on
something with no viable Internet applications.

Richard.
Jul 20 '05 #25
On Thu, 15 Jan 2004 22:56:32 +0000, Steve Pugh <st***@pugh.net> wrote:
It doesn't work at all in Opera 7.23 (even when I set my preference to
allow JavaScript to access the right mouse click, which I normally
don't allow. Can any Opera users remember whether that's off or on by
default?)


I've never changed that setting as far as I can rememember; it's off in
my 7.23.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #26
: One which fails to work as advertised in Mozilla. "Add to favorites"
: does exactly nothing.
Thanks I did disable it (I think) in Mozilla.

Wouter
Jul 20 '05 #27
Darin McGrew <mc****@stanfordalumni.org> wrote:
Steve Pugh <st***@pugh.net> wrote:

You can not set the width property for inline elements, and the height
of an inline element is determined by the line-height property, not by
any images that it may contain. This is already well documented, see
for example: http://www.hut.fi/u/hsivonen/standar...l#lineboxmodel

It seems that both Henri and I have made a mistake. The height of an
inline element is _not_ determined by the line-height property but by
the font-size property. As demonstrated by <span style="border: 1px
solid red;line-height: 2em;">
I understand the "what" of the inline box model: inline elements do not
expand in height to accomodate taller sub-elements (e.g., images, <big>),
among other things.

What I'm missing is the "why" of the inline box model.

Is there documentation of the inline box model that explains the rationale
behind this behavior? The documents I've read (Henri's and Eric's) explain
the "what" of the inline box model well, but not the "why".


I believe that the rationale lies in the desire to keep inline boxes,
box shaped.

Remember that we are dealing with two different types of boxes at the
same time: inline boxes and line boxes.

<span> ... a very long sentence that wraps onto multiple lines with a
slightly too tall <img> in the middle of it ... </span>

The above markup comprises of one inline box (the span element) but
multiple line boxes as the text wraps onto multiple lines.

The span is thus simultaneously one long box and several shorter
boxes. The CSS presentation model wants to keep all those boxes
rectangular and to display them as well as possible.

When there is no image present that is simple the line boxes are all
the same height (derived from the height of the inline box).

But when we include the image there is a problem. Obviously the line
box that contains the image must be taller. But what affect does that
have on the height of the inline box? There are three options.

1. The height of the inline box increases to accomodate the image. But
this means that the height of _all_ the line boxes would increase, not
just the one containing the image. This would give an odd looking
presentation.
2. The height of the inline box increases for the line box containing
the image but not the other line boxes. But this means that the inline
box is no longer box shaped, it has two different heights.
3. The image doesn't affect the height of the inline box at all, just
the height of the line box.

I believe the rationale behind the CSS2 system is a desire to avoid
case 2 above (case 1 being ruled out straight away on aesthetic
grounds).

Is it so important that inline boxes remain box shaped? I don't know.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #28
DJ WIce hu kiteb:
Having the "Disable this" text doesn't make it okay to toy with the
user's browser. What if I wanted to copy and paste? That's not even
on your menu.

I'm now just working on the scripting. And getting it to work like to
normal menu.
When selection is done I can disable the menu, that a nice suggestion!
Thanks.

My menu was made to look good with my browser, not with your site.

Yeah, and what you are viewing is my site ;-)


If I find that the site navigation tools, such as the user interface,
have been manipulated, my first thought is that the webpage contains
potentially hostile content, and my instinctive reaction is to close the
window.

Oops, you lost another viewer.
--
--
Fabian
Visit my website often and for long periods!
http://www.lajzar.co.uk

Jul 20 '05 #29
DJ WIce wrote:
: One which fails to work as advertised in Mozilla. "Add to favorites"
: does exactly nothing.
Thanks I did disable it (I think) in Mozilla.


So you're making it even less useful than it was before? How is a
seriously limited-function context menu supposed to be a good thing for
the user? Please, just throw the whole idea away right now.

--
To email a reply, remove (dash)un(dash). Mail sent to the un
address is considered spam and automatically deleted.
Jul 20 '05 #30
: > : One which fails to work as advertised in Mozilla. "Add to favorites"
: > : does exactly nothing.
: > Thanks I did disable it (I think) in Mozilla.
: So you're making it even less useful than it was before?
?? No the functions that had no function in some browsers, I did remove for
people using those browsers.

: How is a seriously limited-function context menu supposed to be
: a good thing for the user?
Never read: "Less is more"?
So it can be, just need to seach the right less version ;-) LOL.

: Please, just throw the whole idea away right now.
It seem to me that you do not understand that someone can just playa round
and try what's possible before one thinks of the usefullness. If people
would always pre-consider that, then for example SMS would never have been
"invented".

Wouter
Jul 20 '05 #31
"DJ WIce" <co*********@djwice.com> wrote in message
news:bu**********@news.tudelft.nl...
.....
| So it can be, just need to seach the right less version ;-)
LOL.

What ..does that sentence mean?
Jul 20 '05 #32
On Fri, 16 Jan 2004 15:15:12 +0100, "DJ WIce" <co*********@djwice.com>
wrote:
: Please, just throw the whole idea away right now.
It seem to me that you do not understand that someone can just playa round
and try what's possible before one thinks of the usefullness. If people
would always pre-consider that, then for example SMS would never have been
"invented".


If you want to extend the possibilities of a context menu, makes much
more sense to demonstrate to your visitors how to do it efficiently.

e.g. http://www.mattkruse.com/contextmenu/

Jim.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #33
Andrew Thompson wrote:
"DJ WIce" <co*********@djwice.com> wrote in message
news:bu**********@news.tudelft.nl... .... | So it can be, just need
to seach the right less version ;-) LOL.

What ..does that sentence mean?


If you're familiar with the expression "less is more" & you're aware
that 'more' is a utility to page output to the screen (*nix & dos), &
that 'less' is an extension of 'more' (allows scrolling back up through
the output), which no doubt comes in many flavours, you should then
understand.

BTW FWIIW I also think the menu, as anything other than a coding
exercise, is horrible from an HCI point of view.

--
Michael
m r o z a t u k g a t e w a y d o t n e t
Jul 20 '05 #34
: If you want to extend the possibilities of a context menu, makes much
: more sense to demonstrate to your visitors how to do it efficiently.
:
: e.g. http://www.mattkruse.com/contextmenu/

Ah you want me to trick visitors to download a .reg and so have my menu :-)
Well, it's just coding for fun :)
Like you must have noticed when the color of the page in NN is like the
default color of NN 7. And in IE it's that of the classic theme.
I did "even" remove the small black line from your browser window ;-)
For that you need not to specify the dtd else it won't work :)

Wouter
Jul 20 '05 #35
DJ WIce wrote:
Hi all,

I did make a script/css thing to replace the contextmenu on the website with
a new one: http://www.djwice.com/contextmenu.html

It works nice in MSIE, but on Netscape (and probable other browsers) it
stays on the same place (does not "open'' where the mouse is). And the links
do not work when you click on them.

If anyone has sugestions on how to improve it, please let me know.

Thanks,
Wouter

BTW, it works fine in Mozilla 1.5b

--
Bill Drescher
william {at} TechServSys {dot} com

Jul 20 '05 #36
bill drescher wrote:
DJ WIce wrote:

I did make a script/css thing to replace the contextmenu on the website with
a new one: http://www.djwice.com/contextmenu.html

BTW, it works fine in Mozilla 1.5b


No, it does not. "Works fine" is more than just the absence of
JavaScript errors. The scripted context menu neither has the same
options as mozilla, nor do the options change depending on which page
element has focus, nor is it accessible via keyboard.

Functionally, it is vastly inferior to the browser's context menus, so
it does not "work" at all as a replacement.

--
To email a reply, remove (dash)un(dash). Mail sent to the un
address is considered spam and automatically deleted.
Jul 20 '05 #37
On Fri, 16 Jan 2004 21:08:03 +0100, "DJ WIce" <co*********@djwice.com>
wrote:
: If you want to extend the possibilities of a context menu, makes much
: more sense to demonstrate to your visitors how to do it efficiently.
:
: e.g. http://www.mattkruse.com/contextmenu/

Ah you want me to trick visitors to download a .reg and so have my menu :-)
No, you stated your reason for doing this was in that innovation in
contextmenu was good, and you're right it is, which is why Mozilla, IE
and others allow it to be modified easily.
Like you must have noticed when the color of the page in NN is like the
default color of NN 7.
Who knows what you're talking about?
And in IE it's that of the classic theme.


Why, why not use the colour of my contextmenu if you're wanting to be
consistent?

Jim.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #38
"Lasse Reichstein Nielsen" <lr*@hotpop.com> wrote in message
news:n0**********@hotpop.com...
"DJ WIce" <co*********@djwice.com> writes:
: Suggestion: Trash it and stop screwing with my mouse.

Sugestion: look at what you see before complaining; click the option on the bottom of the menu...


Didn't see a thing. I use Opera :) Anyway, I did check in IE and
Mozilla ...

Neither allows me to pop the menu down again when it is up, except by
chosing an entry.


I checked in IE and Mozilla as well (versions 6.0 and 1.6 respectively) and
had no problems with the menu. Right-clicking showed the menu, and clicking
outside of it hid it again.

Christopher Finke
Jul 20 '05 #39
: > And in IE it's that of the classic theme.
:
: Why, why not use the colour of my contextmenu if you're wanting to be
: consistent?

If you can tell me how I could get that information from every IE (or NN)
visitor I would. I did not know that it was possible.

Wouter
Jul 20 '05 #40
in post: <news:bu**********@news.tudelft.nl>
"DJ WIce" <co*********@djwice.com> said:
: Why, why not use the colour of my contextmenu if you're wanting to be
: consistent? If you can tell me how I could get that information from every IE (or NN)
visitor I would. I did not know that it was possible.


http://www.w3.org/TR/REC-CSS2/ui.html#system-colors

--
brucie - i usenet nude
Jul 20 '05 #41
: The scripted context menu neither has the same options as mozilla
True.

: nor do the options change depending on which page
: element has focus
I'm working on that. Checking if there is a selection or a field focus.

: nor is it accessible via keyboard.
False, use your contextmenu key, use your arrow down if you use MSIE or elke
tab (I do not yet know how to enable arrow keys in NN.
I just think focus the next element of the <a href=""> array and with the
final (just check the name) the x elements before the current).

: Functionally, it is vastly inferior to the browser's context menus
That's just a mather of tast, but of cause, it's just a test case to script
some, so don't worry.

Thanks, :-)
Wouter
Jul 20 '05 #42
: http://www.w3.org/TR/REC-CSS2/ui.html#system-colors
: --
: brucie - i usenet nude

!THANKS!
Wow! Just didn't know!

Wouter
Jul 20 '05 #43
in post: <news:bu**********@news.tudelft.nl>
"DJ WIce" <co*********@djwice.com> said:
: brucie - i usenet nude !THANKS!
Wow! Just didn't know!


i can send you pictures if you like
--
brucie - i usenet nude
Jul 20 '05 #44
: > : Why, why not use the colour of my contextmenu if you're wanting to be
: > : consistent?
: > If you can tell me how I could get that information from every IE (or
NN)
: > visitor I would. I did not know that it was possible.
:
: http://www.w3.org/TR/REC-CSS2/ui.html#system-colors

Hmm.. I do not get the menucolor of the Netscape theme.
Only of the system, so it should now work for MSIE since it would get the
right color, but not (yet) in NN.
If one would know how to get that, it would be nice :-)

Wouter
Jul 20 '05 #45
DJ WIce wrote:

: nor is it accessible via keyboard.
False, use your contextmenu key, use your
tab
Context menus do not require the use of the tab key. To anyone
accustomed to using context menus via keyboard, your menu will appear to
be dysfunctional when they find the arrow keys have no effect.
: Functionally, it is vastly inferior to the browser's context menus
That's just a mather of tast,
No, it's a matter of fact. I've already listed the deficiencies.
but of cause, it's just a test case to script
some, so don't worry.


I worry because some clueless deezyner is going to see your sample,
think it's a neat idea, and implement it on their site. We already have
enough unusable sites out there, please don't add to the dung pile.

--
To email a reply, remove (dash)un(dash). Mail sent to the un
address is considered spam and automatically deleted.
Jul 20 '05 #46
: Context menus do not require the use of the tab key. To anyone
: accustomed to using context menus via keyboard, your menu will appear to
: be dysfunctional when they find the arrow keys have no effect.
I just wrote in the prevous message how I will solve that :-)

BTW I'm not the first, making such menu, I saw on internet two pages who
sell it for $99 and $78. But they do only respond to right click and they
both have no arrow keys enabled. By the way, that menu does not change if
there is something selected of if there is a field focus. I'm planning to
make that happen, but I thing selection detecting is very hard. Since you'll
get an error if there is nothing selected.

Ciao,
Wouter
Jul 20 '05 #47

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

Similar topics

52
by: DJ WIce | last post by:
Hi all, I did make a script/css thing to replace the contextmenu on the website with a new one: http://www.djwice.com/contextmenu.html It works nice in MSIE, but on Netscape (and probable...
1
by: Brian Martel | last post by:
I am trying to create a dynamic flyout submenu off of a contextmenu. I can right click and get the base contextmenu ok. On the Popup event I add MenuItem's to the collection of one of the items so...
2
by: Derrick | last post by:
I've been working on an application which has a NotifyIcon (system tray icon), and a corresponding ContextMenu. I want to be able to update this menu dynamically. However, when I make changes to...
10
by: tmaster | last post by:
When I try to dynamically add a second sub menu item to this ContextMenu item, I get an error 'Specified argument was out of the range of valid values'. Private Sub mnuTopics_Show_Select(ByVal...
7
by: TryingLikeHeck | last post by:
I have a usercontrol on which I've generated a context menu in designer. The properties of the control lists for ContextMenu (none) The menu shows up in the designer window and I can edit it To...
3
by: asharda | last post by:
Hi, I am trying to create a context menu in my application. The context menu takes menu otems from an XML file. In XAML the code is <Grid.ContextMenu> <ContextMenu Name="cm" StaysOpen="true"...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.