Connecting Tech Pros Worldwide Forums | Help | Site Map

CSS + JavaScript Web Page Menu for public comment and use!

relaxedrob@optushome.com.au
Guest
 
Posts: n/a
#1: Jul 20 '05
Howdy All!

I have just finished developing a menu template for easy use in an any
web page!

The example uses CSS and JavaScript.

The url is:
http://phd.netcomp.monash.edu.au/RobertMarkBram/menu/

This example is free for anyone to use, comment or criticise - just
leave my name in it somewhere if you use it in your site!

Rob
:)

Jim Ley
Guest
 
Posts: n/a
#2: Jul 20 '05

re: CSS + JavaScript Web Page Menu for public comment and use!


On 7 Aug 2003 23:06:04 -0700, relaxedrob@optusnet.com.au
(relaxedrob@optushome.com.au) wrote:
[color=blue]
>http://phd.netcomp.monash.edu.au/RobertMarkBram/menu/
>
>This example is free for anyone to use, comment or criticise - just
>leave my name in it somewhere if you use it in your site![/color]

Any script which hides key navigation content in javascript (which is
not always enabled obviously) is generally a bad idea, a more sensible
approach is to transform an unordered list or something similar that
has considerable meaning and doesn't break the accessibility of your
script when JS was disabled. Perhaps even more importantly it doesn't
hide your links from Google.

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

Robert Mark Bram
Guest
 
Posts: n/a
#3: Jul 20 '05

re: CSS + JavaScript Web Page Menu for public comment and use!


Hi Jim!
[color=blue]
> Any script which hides key navigation content in javascript (which is
> not always enabled obviously) is generally a bad idea, a more sensible
> approach is to transform an unordered list or something similar that[/color]

An unordered list kept where?

JavaScript cannot open an external file and once I put the list into the
html file I am stuck with having to duplicate that list on every page that
requires a menu - precisely the maintenance task I want to avoid with a
script like this.

I was thinking that frames could be used - the navigation frame document
could be the place to store the list in html, but CSS positioned elements
cannot display accross frame borders, so that won't work either.
[color=blue]
> has considerable meaning and doesn't break the accessibility of your
> script when JS was disabled.[/color]

Well, if JavsScript is disabled the whole script is broken... visitors must
have JavaScript turned on to access the example: to be honest I do not think
this is an unrealistic expectation.
[color=blue]
> Perhaps even more importantly it doesn't
> hide your links from Google.[/color]

Yes, this is a very good point

Thank you for your feedback!

Rob
:)


Robert Mark Bram
Guest
 
Posts: n/a
#4: Jul 20 '05

re: CSS + JavaScript Web Page Menu for public comment and use!


Howdy!
[color=blue]
> I am looking for something to put into a "default header" to make[/color]
mod_layout[color=blue]
> produce a header I can use on all my future pages - like the ones I use in
> http://ketil.homeunix.net/tegneserie/ and
> http://ketil.homeunix.net/logg/nettsted/tegneserie.html[/color]

If you are after some way to output the same <head > element into multiple
documents, I believe a server side language would be very good for that. In
fact, if were not for the fact that I wanted to produce a JavaScript
example, I would have used JSP - that way I could obey some of quite valid
points raised by Jim.

My example uses JavaScript to insert content - but it requires a few
insertions into the standard HTML of a document to place it there.

Rob
:)



Isofarro
Guest
 
Posts: n/a
#5: Jul 20 '05

re: CSS + JavaScript Web Page Menu for public comment and use!


ketil V. wrote:
[color=blue]
> Jim Ley wrote:
>[color=green]
>> Any script which hides key navigation content in javascript (which is
>> not always enabled obviously) is generally a bad idea, a more sensible
>> approach is to transform an unordered list or something similar that
>> has considerable meaning and doesn't break the accessibility of your
>> script when JS was disabled. Perhaps even more importantly it doesn't
>> hide your links from Google.[/color]
>
> Don't mean to intrude here (or...) but do you got a refference to
> somewhere telling how this is done?[/color]

http://www.gazingus.org/
http://jibbering.com/
http://tom.me.uk/

and http://www.alistapart.com have an article titled "Taming Lists"


--
Iso.
FAQs: http://html-faq.com http://alt-html.org http://allmyfaqs.com/
Recommended Hosting: http://www.affordablehost.com/
Web Standards: http://www.webstandards.org/
Jim Ley
Guest
 
Posts: n/a
#6: Jul 20 '05

re: CSS + JavaScript Web Page Menu for public comment and use!


On Sat, 9 Aug 2003 01:58:02 +1000, "Robert Mark Bram"
<relaxedrob@remove.this.optusnet.com.au> wrote:
[color=blue][color=green]
>> Any script which hides key navigation content in javascript (which is
>> not always enabled obviously) is generally a bad idea, a more sensible
>> approach is to transform an unordered list or something similar that[/color]
>
>An unordered list kept where?[/color]

Within the document, the problem with author once, see in multiple
URI's is a seperate one, you shouldn't combine them, since javascript
for content is simply too unreliable, so while javascript includes
might've been a solution the %age of clients where it won't work
(including key clients like google of course) makes it inefficient.

There's 2 obviousapproaches, the SSI/server generated one, where you
have each page served by a script on the website, including the
content, SSI is the simplest method of this and it's supported very
widely.

Certain webhosts don't support it, and I'd say go find another if
that's the case, however you might not always be able to do this, or
the site might be such high volume that you don't want the processor
hit (if this is genuinely the case you can probably get funding for
better hardware from somewhere - after all someone's happy to pay for
the bandwidth)

In that case though you can pre-process the documents to static HTML,
probably best to still use SSI for development (since you can run a
suitable webserver on your development box) then you can run a tool
when you publish which combines everything - the main cost is that you
need to upload everything after doing this (or generate on the server,
but that's unlikely if you've not got SSI on the server) So upload
costs are higher.
[color=blue]
> precisely the maintenance task I want to avoid with a
>script like this.[/color]

There are better solutions without the problem, a ciwa.site-design or
ciwa.cgi will probably be the place to ask if you need more help after
googling.
[color=blue]
>Well, if JavsScript is disabled the whole script is broken... visitors must
>have JavaScript turned on to access the example: to be honest I do not think
>this is an unrealistic expectation.[/color]

In the real world, I'm afraid it's very unrealistic to expect
javascript, Google especially would have trouble, running javascript
in a robot is tough, you have to make sure the javascript can't do
anything nasty to your poor little robot.

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

Closed Thread