check for javascript

E

earl

Kris said:
It gets executed.


Thanks for your reply.

What I actually meant, wrote the orginal question without actually thinking
it through, I have a javascript menu system on my website, I'd like the
webpage to check whether the user thats browsing the webpages actually has
support for javascript and if he\she does then use the javascript system
otherwise use standard html menu system. Something like this I guess :
if javascript then
do this
else
do that

Hope that clear it up.
 
I

Isofarro

earl said:
What I actually meant, wrote the orginal question without actually
thinking it through, I have a javascript menu system on my website, I'd
like the webpage to check whether the user thats browsing the webpages
actually has support for javascript and if he\she does then use the
javascript system otherwise use standard html menu system. Something like
this I guess : if javascript then
do this
else
do that

Structure it this way:

present the standard html menu system
if javascript
enhance menu.
 
K

Kris

What I actually meant, wrote the orginal question without actually thinking
it through, I have a javascript menu system on my website, I'd like the
webpage to check whether the user thats browsing the webpages actually has
support for javascript and if he\she does then use the javascript system
otherwise use standard html menu system. Something like this I guess :
if javascript then
do this
else
do that

Have the page work without Javascript. Then use it to cook it up a bit.

Like a menu that is there and working in 'plain' HTML and JS makes it
'better'. Like at <http://www.joukedevries.nl/> (not the best of
examples, but nevertheless in the spirit).
 
D

David Dorward

earl said:
I have a javascript menu system on my website

Of dear, they are usually more trouble then they are worth...
, I'd
like the webpage to check whether the user thats browsing the webpages
actually has support for javascript and if he\she does then use the
javascript system otherwise use standard html menu system. Something like
this I guess : if javascript then
do this
else
do that

A well written system would start with normal HTML which works by itself,
then CSS would be added to enhance the presentation, then a layer of
interactivity could be added using JavaScript to manipulate the *existing*
HTML.
 
I

Isofarro

Eric said:
Isofarro said:
earl wrote:
[...] Something like
this I guess : if javascript then
do this
else
do that

Structure it this way:

present the standard html menu system
if javascript
enhance menu.

I think HTML provides[0] a quite simple way to do what the OP wants.

[0] <http://www.w3.org/TR/html401/interact/scripts.html#edef-NOSCRIPT>

Involves a bit of duplication though. Have a look at:
http://www.cs.tut.fi/~jkorpela/html/augm.html
 
W

Whitecrest

Of dear, they are usually more trouble then they are worth...

But they look cool. And sometimes looking cool brings in your
customers.
A well written system would start with normal HTML which works by itself,
then CSS would be added to enhance the presentation, then a layer of
interactivity could be added using JavaScript to manipulate the *existing*
HTML.

If you are building a site that will exclude no one (or as few as
possible), then this is exactly how you should build it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,095
Messages
2,570,616
Members
47,232
Latest member
helpplease!

Latest Threads

Top