I'm doing an ASP-built Intranet app, and am having trouble with a bit
of
code on the menu I am using. I got it from some free site, but I tried
emailing the person whose email address is in the code, but that email
addy
doesn't work anymore.
Since it's Intranet, I put an HTML version on the web for you to look
at.
The links won't work, of course. Address is http://www.middletree.net/T16155.htm
What I want to do is make a print.css so that when it is printed, the
menu
will be invisible. If you look at my code, you'll see that there is a
main
css file, and a print one, called print.css. I need to put something in
there which tells the divs which contain the menu to be hidden.
However, I
have not been able to figure out what those divs are called. I have
pored
through your JavaScript code, but just cannot figure this out.
Please note that I cannot simply say div {display:none;}, as there are
divs
in the bottom part for that hide-show stuff, and they need to remain
unaffected by this. 9 3336
On 19 Nov 2004 13:36:47 -0800, middletree <mi********@gmail.com> wrote:
[snip] What I want to do is make a print.css so that when it is printed, the menu will be invisible. If you look at my code, you'll see that there is a main css file, and a print one, called print.css. I need to put something in there which tells the divs which contain the menu to be hidden.
Ah, good 'ol HVMenu. I'm glad this is only for an intranet. It has no
business existing on the Web.
However, I have not been able to figure out what those divs are called. I have pored through your JavaScript code, but just cannot figure this out.
At present, the DIVs aren't given ids. That makes the first few rules in
your print stylesheet meaningless, I believe.
Using the DOM Inspector supplied with Firefox, I managed to track down the
relevant part of the code you need to modify:
Open menu_com.js and find the Go function (about a fifth of the document
down). There are two blocks that begin
if(FrstCreat){
Move to the second one which contains the call to CreateMenuStructure.
After that call, add
FrstCreat.id = '...';
replacing the ellipsis with whatever you want for an id. This now
identifies the outermost DIV. You can now remove it with
#menu-id {
display: none;
}
[snip]
Good luck,
Mike
--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
On Sat, 20 Nov 2004 18:55:24 +0000 (UTC), ExGuardianReader
<no***@noway.com> wrote: middletree wrote:
Please note that I cannot simply say div {display:none;}, as there are divs in the bottom part for that hide-show stuff, and they need to remain unaffected by this.
You can speficy style rules with more granularity than just attaching them to tag names.
The problem here is that the script doesn't supply anything specific to
use in selectors. The only recourse is to alter the script first, then add
some appropriate CSS. See my other post.
[snip]
Mike
--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Thanks for this. I understood that it was a matter of finding the selector
and adding an id to it, but I couldn't for the life of me figure out where
in the code to do that.
The advice I got seemed logical, but didn't work.
Here's the changed code:
if(FrstCreat){FrstCntnr=CreateMenuStructure('Menu' ,NoOffFirstLineMenus);
FrstCreat.id = 'noPrint';
FrstCreat=(AcrssFrms)?0:1}
else CreateMenuStructureAgain('Menu',NoOffFirstLineMenu s);
And in the print.css, I put
#noPrint {display: none;}
..noPrint {display: none;}
Perhaps I put that create id code in the wrong place?
On Sat, 20 Nov 2004 16:10:38 -0600, mt <mi********@HTOmail.com> wrote:
[snip] Perhaps I put that create id code in the wrong place?
Nuts. Sorry, I wrote the wrong identifier. It should have been:
FrstCntnr.id = '...';
That is, the variable that is assigned the result of CreateMenuStructure.
Mike
--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
YESSSSSSSSSSSSSSSSSSSS!!!!!!!!!!!!!!!!!!!!!
You have no idea how much time I put into this! Thanks big time!
Now, you say the menu I got is badly coded, and I realize that more now than
I did when I first started building this thing. I am tempted to go to
ProjectSeven.com and build a new menu from there to replace this one. But if
you have any others that meet the criteria of (a) free (b) easily
manipulatable by people like me with little JS understanding, I'd appreciate
hearing about it.
But even if you don't, you have done me a great service today. Thanks very
much!
"Michael Winter" <M.******@blueyonder.co.invalid> wrote in message
news:opshsavlaax13kvk@atlantis... On Sat, 20 Nov 2004 16:10:38 -0600, mt <mi********@HTOmail.com> wrote:
[snip]
Perhaps I put that create id code in the wrong place?
Nuts. Sorry, I wrote the wrong identifier. It should have been:
FrstCntnr.id = '...';
That is, the variable that is assigned the result of CreateMenuStructure.
Mike
-- Michael Winter Replace ".invalid" with ".uk" to reply by e-mail.
On Sat, 20 Nov 2004 16:22:50 -0600, mt <mi********@HTOmail.com> wrote:
[snip] Thanks big time!
You're welcome.
Now, you say the menu I got is badly coded, and I realize that more now than I did when I first started building this thing.
Absolutely.
- 23KBs+ is far too large for a single script.
- The source is pretty much impossible to navigate, and that wasn't
intentional.
- There is no provision at all for navigation when scripting is
disabled.
- Disabling CSS produces something unrecognisable as a navigation
aid.
- Uses browser detection.
I might be forgetting something...
I am tempted to go to ProjectSeven.com and build a new menu from there to replace this one.
The menu on the home page seems well-written to a point, but it doesn't
lineralise well with scripting disabled. Moreover, $90? No thanks.
But if you have any others that meet the criteria of (a) free (b) easily manipulatable by people like me with little JS understanding, I'd appreciate hearing about it.
For the moment, the only ones I'm happy to recommend are present in an
article on Netscape's DevEdge website. Although DevEdge is now dead, you
can still access the article with the Wayback Machine:
<URL:http://web.archive.org/web/20040202080126/devedge.netscape.com/viewsource/2003/devedge-redesign-js/>.
There are two other menus linked in the conclusion.
[snip]
Mike
Please don't top-post.
--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
"Michael Winter" <M.******@blueyonder.co.invalid> wrote in message
news:opshs46azvx13kvk@atlantis... I am tempted to go to ProjectSeven.com and build a new menu from there to replace this one. The menu on the home page seems well-written to a point, but it doesn't lineralise well with scripting disabled. Moreover, $90? No thanks.
What's lineralise mean? Can't find that in any help file or doc.
And I was talking about the free Swap Class extension and tutorial that are
on the P7 site. I guess 90 bucks would be worth it to be able to build a
menu through a GUI, because of the time is saves. For the moment, the only ones I'm happy to recommend are present in an article on Netscape's DevEdge website. Although DevEdge is now dead, you can still access the article with the Wayback Machine:
<URL: http://web.archive.org/web/200402020...e.com/viewsour
ce/2003/devedge-redesign-js/>.
thanks
On Sun, 21 Nov 2004 12:13:16 -0600, mt <mi********@HTOmail.com> wrote: "Michael Winter" <M.******@blueyonder.co.invalid> wrote in message news:opshs46azvx13kvk@atlantis...
[snip] The menu on the home page seems well-written to a point, but it doesn't lineralise well with scripting disabled. Moreover, $90? No thanks.
What's lineralise mean?
In one draft of my reply I did describe what I meant there. Obviously I
deleted that.
Can't find that in any help file or doc.
You won't, but basically what I was trying to describe is how the menu
looks when it's not in its intended state. When scripting is disabled (or
enabled but doesn't provide the necessary functionality), the menu
displays as one, long linear list. There's nothing obvious, like
indentation, to signify where the various sub-menus begin and end.
And I was talking about the free Swap Class extension and tutorial that are on the P7 site.
Well, you never said that. :P
I guess 90 bucks would be worth it to be able to build a menu through a GUI, because of the time is saves.
All you're doing is creating a set of nested unordered lists. That part
isn't complicated at all. You're paying for (in my opinion) the rather
over-priced effort they made.
[snip]
Mike
--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: b-blochl |
last post by:
I wonder about the huge traffic in the question how many tuples are
dispensible. I find that a question of only ternary or quarterny order -
use it or use it not (free after Shakespears "to be or...
|
by: Lorenzo Villari |
last post by:
I premise I don't know C++ well but... I wondered what is this data hiding
thing... I mean, if I can look at the header (and i need it beacuse of the
class), then what's hidden?
Can someone give...
|
by: Jack |
last post by:
On the 1st of January 1998, Bjarne Stroustrup gave an interview to the
IEEE's 'Computer' magazine. Naturally, the editors thought he would be
giving a retrospective view of seven years of...
|
by: Bob Weiner |
last post by:
What is the purpose of hiding intead of overriding a method? I have googled
the question but haven't found anything that makes any sense of it.
In the code below, the only difference is that...
|
by: Nicolas Castagne |
last post by:
Hi all,
I have been wondering for a while why function hiding (in a derived
class) exists in C++, e.g. why when writing
class Base {
void foo( int ) {}
};
class Derived: public Base {
void...
|
by: developer.new |
last post by:
Hi
I have a question regarding this concept I learned about recently:
Name Hiding. Here's what I've come across:
There is a base class with two functions with the same name but
different...
|
by: rohitchawla |
last post by:
i am trying to show and hide a div when onmouseover and onmouseover another div element.
i am setting a setTimeout duration on onmouseout to delay the hiding of div for around two second
The...
|
by: Sh4wn |
last post by:
Hi,
first, python is one of my fav languages, and i'll definitely keep
developing with it. But, there's 1 one thing what I -really- miss:
data hiding. I know member vars are private when you...
|
by: heavyz |
last post by:
In C, if i want to declare a struct, there are 3 methods to do so:
1: struct dummy { ... };
2: typedef struct { ... } dummy;
3: typedef struct _dummy { ... } dummy;
Usually i use the first...
|
by: matt |
last post by:
Hello group,
I'm trying to become familiar with the information hiding design rules, and I
have a lot (3) of questions for all you experts. AFAIK, a generic module has 2
files:
...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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...
| |