473,320 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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

Jul 28 '06 #1
5 2078

patricksabou...@hotmail.com wrote:
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.

Jul 28 '06 #2
pa*************@hotmail.com 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.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 28 '06 #3
web.dev said the following on 7/28/2006 6:10 PM:
patricksabou...@hotmail.com wrote:
>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.
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.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 28 '06 #4

Randy Webb wrote:
web.dev said the following on 7/28/2006 6:10 PM:
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.
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.

Jul 28 '06 #5
I ended up using document.write statements.

Thanks for all of your help and suggestions.


web.dev wrote:
Randy Webb wrote:
web.dev said the following on 7/28/2006 6:10 PM:
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.

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.
Aug 10 '06 #6

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

Similar topics

13
by: Kai Grossjohann | last post by:
It seems that Ctrl-N in Mozilla opens a new empty browser window. That's fine, I don't need to do anything about it. But Ctrl-N in IE appears to clone the current window. Is there a way to...
1
by: John Mullen | last post by:
I want to take the following HTLM and use javascript to turn on radio buttons if checkbox is checked, can I do this with javascript (maybe onClick or an array) or do i need a server side script ?...
30
by: Mason A. Clark | last post by:
If I use javascript on my page, how likely is it that the viewer will not have javascript? Anyone have data? Mason C
0
by: yurps | last post by:
Hello here is my html, if you click the missing image in the first column on the left, the div is shown, when clicked again the div disappears...but the bottom border disappears as well...Is there...
2
by: Targa | last post by:
I have a select box with about 5 options. I need to have one of the options, when selected, display a second select box. The second select box is populated by a database and needs to be preloaded...
2
by: Mel | last post by:
i want to diable all submit_buttons untill all my form elements are populated. how can i do that ? thanks
2
by: teddy.am | last post by:
Guys, I have a set of 6 radio buttons, infront of each one there's a textbox .... i need all textboxes disabled .... once one of the radio buttons is selected, the texbox infront of it will be...
31
by: Manfred Kooistra | last post by:
If I have a document like this: <html> <head> <script language=javascript> window.location.href='file.php'; </script> </head> <body> body content
1
by: tgorton | last post by:
I am having a problem running a javascript function as part of an html-el:form onsubmit. The problem seems to exists in IE6 but not in Firefox. html: <html-el:form action="${target}"...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.