When JavaScript is disabled, do not display HTML form and form elements

P

patricksabourin

On my site,

I have 2 methods of displaying my data:
1) HTML form with select-option element. (Jump to different page when
clicking "Go" button"
2) HTML table with a hyperlink.

What I would like to do is the following:
If JavaScript is disabled (or non existant on some browsers), to NOT
display the HTML form with select-option element.

This will help to keep the webpage cleaner for the viewers.


PS: I only have access to client-side scripting.

Thanks
 
W

web.dev

On my site,

I have 2 methods of displaying my data:
1) HTML form with select-option element. (Jump to different page when
clicking "Go" button"
2) HTML table with a hyperlink.

What I would like to do is the following:
If JavaScript is disabled (or non existant on some browsers), to NOT
display the HTML form with select-option element.

This will help to keep the webpage cleaner for the viewers.


PS: I only have access to client-side scripting.

Thanks

Then you should use css to style it such that the form is initially not
visible. When javascript is available, the script should switch it
back to being visible.

If you _only_ have access to client-side scripting, then it's not your
problem. It's the responsibility of the web page author.
 
R

Randy Webb

(e-mail address removed) said the following on 7/28/2006 6:06 PM:
On my site,

I have 2 methods of displaying my data:
1) HTML form with select-option element. (Jump to different page when
clicking "Go" button"

Use scripting to create the select element and the Go Button. Then, if
scripting is disabled or not present, then the select isn't there at all.
 
R

Randy Webb

web.dev said the following on 7/28/2006 6:10 PM:
Then you should use css to style it such that the form is initially not
visible.

No, you don't.
When javascript is available, the script should switch it back to being visible.

No, you have JS create it to begin with. Then, if scripting is enabled,
you see the select, otherwise you don't. And if the code to create the
select is in an external file, you don't have to download code that
never gets executed.
If you _only_ have access to client-side scripting, then it's not your
problem. It's the responsibility of the web page author.

Do you have any comprehension of the question asked? Go read it again.
It is quite obvious that he *is* the web page author.
 
W

web.dev

Randy said:
web.dev said the following on 7/28/2006 6:10 PM:

Do you have any comprehension of the question asked? Go read it again.
It is quite obvious that he *is* the web page author.

I do. But the way it was read suggested that he is only an author for
client side scripting while there might have been another who strictly
does html authoring.
 
P

patricksabourin

I ended up using document.write statements.

Thanks for all of your help and suggestions.
 

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
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top