473,624 Members | 2,577 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Site with killer JavaScript Degradation?

I cannot for the life of me remember the site name, but I believe it was the site of one
of the regular posters here or perhaps in comp.lang.java. javascript. Anyway...

The site in particular boasted about accessible JavaScript or proper JavaScript
degradation, something along those lines. I remember specifically when I visited the site
without JavaScript enabled it displayed the entire "menu" in a vertical fashion along the
left side of the page without destroying the placement of the rest of the content. With
JavaScript enabled it was a horizontal menu spanning the top of the page (I think).

I realize this is ridiculously vague, but if anyone has any idea about the site, please
provide the URL. I'd love to check out the design and code aspect of it.

Alrighty... so, thanks guys/gals!

-Lost
Jan 24 '07 #1
4 1537
Hi,

-Lost wrote:
I cannot for the life of me remember the site name, but I believe it was the site of one
of the regular posters here or perhaps in comp.lang.java. javascript. Anyway...

The site in particular boasted about accessible JavaScript or proper JavaScript
degradation, something along those lines. I remember specifically when I visited the site
without JavaScript enabled it displayed the entire "menu" in a vertical fashion along the
left side of the page without destroying the placement of the rest of the content. With
JavaScript enabled it was a horizontal menu spanning the top of the page (I think).

I realize this is ridiculously vague, but if anyone has any idea about the site, please
provide the URL. I'd love to check out the design and code aspect of it.

Alrighty... so, thanks guys/gals!

-Lost
It's a complex subject, but there are a few ground rules that you can
follow. Don't forget that some browsers have also limited CSS support,
so you should think not only of what happens when JavaScript is off, but
also when CSS is off. I might be a good idea to check your site in
mobile browsers too, for example Blazer or Xiino for Palm OS. The result
is sometimes suprising (for example, Blazer supports a subset of
JavaScript. It supports document.write, for example, but not
document.getEle mentById)

- Always display the elements first, and hide them with JavaScript. This
was, you ensure that the element is displayed if JavaScript is off. That
sounds like an obvious statement, but for example DotText (a .NET blog
system) doesn't follow it, which is a pain.
Of course, it's the contrary for elements which must only be displayed
if script is active. For example, some "image buttons" are only active
when JavaScript is on, so you should hide them first and display them
using JavaScript.

- Use feature detection instead of browser detection. If you need
getElementById somewhere, test for it first:

if ( document.getEle mentById )
{
document.getEle mentById( "myDiv" ).style.top = "...";
}

- Use CSS. When using position: absolute for elements, think about the
order in which you place them on your HTML page, since they will appear
in that same order if CSS positioning if not supported.

- Try to use JavaScript to improve the user experience, but not for
critical functionality. Often, you must duplicate functionality on the
client and on the server: On the client to avoid unnecessary postbacks;
on the server because it's the only place where you're sure that the
code will be executed.

- Use links in that form:
<a href="nojs.html "
onclick="doSome thing();return false;">Somethi ng</a>

This ensures that the user will see something if JavaScript is off when
he clicks the link. Using "#" is bad practice. The page "nojs.html"
should explain what just happened, for example
http://www.galasoft-lb.ch/nojs.html

- If you use JavaScript for navigation too, don't forget to include the
target page's URL in the HREF:

<a href="nextPage. html"
onclick="naviga teTo( this.href );return false;">Go to next page</a>

I try to do my best and offer a functional site with JavaScript off
(www.galasoft-lb.ch). However, I am not satisfied yet (for example, the
menu on my page may hide part of the page's content if JavaScript is
off, but CSS positioning is supported. I must find a better solution here).

HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Jan 24 '07 #2
"Laurent Bugnion [MVP]" <ga*********@bl uewin.chwrote in message
news:45******** **@news.bluewin .ch...
Hi,
<SNIPPED>

Thanks a bunch, Laurent!

(You may remember me... you sent me the CommTest source a while back. Which, by the way,
I never could quite get to work as is. Then again, I am fairly Java illiterate.)

And lastly, by the way, whatever happened to:

"On another note, I got the firm's permission to publish our JavaScript programming
guidelines. I want to prepare them first, I'll publish them as soon as I get to it,
promised."

I would *love* to get my hands on that.

-Lost
Jan 25 '07 #3
Hi,

-Lost wrote:
"Laurent Bugnion [MVP]" <ga*********@bl uewin.chwrote in message
news:45******** **@news.bluewin .ch...
>Hi,

<SNIPPED>

Thanks a bunch, Laurent!

(You may remember me... you sent me the CommTest source a while back. Which, by the way,
I never could quite get to work as is. Then again, I am fairly Java illiterate.)
I remember you well. Thanks to you I found out that my new ISP refused
to serve .java files (the previous one served them as text). It makes
sense, since the new ISP is .NET 2 enabled, and in .NET 2, you may copy
source files to the server to let them be compiled on the fly.

Sorry you didn't get it to work. The concept is not really difficult,
the reason it works is that all applets in a web browser run in the same
process (and even the same AppDomain apparently), so they can share
static members.

And lastly, by the way, whatever happened to:

"On another note, I got the firm's permission to publish our JavaScript programming
guidelines. I want to prepare them first, I'll publish them as soon as I get to it,
promised."

I would *love* to get my hands on that.
I know. I will get to it as soon as I can. I have been just too busy
lately. I put that on my priority list, I promise.

-Lost
Greetings,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Jan 26 '07 #4
-Lost wrote:
I cannot for the life of me remember the site name, but I believe it was the site of one
of the regular posters here or perhaps in comp.lang.java. javascript. Anyway...

The site in particular boasted about accessible JavaScript or proper JavaScript
degradation, something along those lines. I remember specifically when I visited the site
without JavaScript enabled it displayed the entire "menu" in a vertical fashion along the
left side of the page without destroying the placement of the rest of the content. With
JavaScript enabled it was a horizontal menu spanning the top of the page (I think).

I realize this is ridiculously vague, but if anyone has any idea about the site, please
provide the URL. I'd love to check out the design and code aspect of it.

Alrighty... so, thanks guys/gals!

-Lost



A List Apart requires all their tutorials to degrade gracefully. That's
probably what you were thinking of since you mentioned menus.

http://alistapart.com/
--
http://www.hunlock.com -- Musings in Javascript, CSS.
$FA
Jan 27 '07 #5

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

Similar topics

10
2114
by: Gernot Frisch | last post by:
Hi, I have found some menu functions. It works quite well, but how can I replace it with a simple <a href> if javascript is turned off? I reduced my code to: <script>IncludeMenuHere()</script> More, any tips about "fading" the menu item in and out (x-browser)? Currently it's using DIVs and this.items.visibility(false);
11
4849
by: matty | last post by:
Hi, I was wondering if there is a known statistic on how many people disable javascript support from their client, and if they do is it intentional or by some default, and when it is intentional what is the reason behind it? For example, I have disabled Flash support and I realize that a lot of sites will just not even check if I support it or not and will just show me a blank page, and they don't see to care/know about it.
6
4193
by: b. hotting | last post by:
Hi, I don't see why this won't work, it are 3 links, the last one (a get) does work, but the first 2 won't. i would like to use a post, through hidden input types any idea? thanks for your help! bjorn
3
1864
by: hagarwal | last post by:
People, Here's my situation: 1. I have a web browser component that does not support Javascript (well it does, but we've disabled it) 2. I have to display some HTML in it, where the user has a link titled "Hide|Show Options" that can hide/show a particular section of the HTML. I have not found a way to achieve it without using Javascript or any other scripting language.
21
6042
by: petermichaux | last post by:
Hi, I've been asking questions about library design over the last week and would like to get feedback on my overall idea for a JavaScript GUI library. I need a nice GUI library so there is a good chance I will write this as I need new widgets. I haven't found anything like this and I'm surprised/disapointed this doesn't already exist. My library prototype works nicely. I think parts of these ideas are not commonly used for JavaScript...
11
1482
by: John Pote | last post by:
Hi everyone, I've just started adding JavaScript to some of my web pages. It then occurred to me that of course not everyone may have JavaScript in their browser and more probably may have JavaScript disabled for security reasons (particularly on machines within a company network). So my questions are, 1: is there any estimate available of the percentage of users not having JavaScript available to them,
15
3777
by: nikki_herring | last post by:
I am using setTimeout( ) to continuously call a function that randomly rotates/displays 2 images on a page. The part I need help with is the second image should rotate 3 seconds after the first image rotates. I cannot figure out how to accomplish the 3 second delay. My code is pasted below: function randPic(){ randPic1(); randPic2();
78
3366
by: Jeremy J Starcher | last post by:
(Request for Discussion) I've put together a guide that I hope will help novice coders avoid the same hair pulling that I went through. I'm open for comments about it. Have I missed the mark on a point or two? Have I overlooked something? Is my basic goal flawed? Is code bad in so many different ways that I
35
315
by: Dan Rumney | last post by:
Hi all, I've been writing Javascript for quite a while now and have, of late, been writing quite a lot of AJAX and AJAX-related code. In the main, my dynamically generated pages are created using Perl on the backend, with Javascript providing limited frontend functionality. As an example, an expanding tree would be fully populated on the server-side and then presented to the browser, with Javascript and CSS being used to vary the...
0
8249
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8493
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7176
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6112
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4187
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2613
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1493
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.