Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > When JavaScript is disabled, do not display HTML form and form elements

Reply
Thread Tools

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

 
 
patricksabourin@hotmail.com
Guest
Posts: n/a
 
      07-28-2006
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

 
Reply With Quote
 
 
 
 
web.dev
Guest
Posts: n/a
 
      07-28-2006

(E-Mail Removed) 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.

 
Reply With Quote
 
 
 
 
Randy Webb
Guest
Posts: n/a
 
      07-28-2006
http://www.velocityreviews.com/forums/(E-Mail 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.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
 
Reply With Quote
 
Randy Webb
Guest
Posts: n/a
 
      07-28-2006
web.dev said the following on 7/28/2006 6:10 PM:
> (E-Mail Removed) 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/
 
Reply With Quote
 
web.dev
Guest
Posts: n/a
 
      07-28-2006

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.

 
Reply With Quote
 
patricksabourin@hotmail.com
Guest
Posts: n/a
 
      08-10-2006
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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
newb: recurse over elements children and disable all form elements SteveKlett@gmail.com Javascript 4 09-20-2006 07:42 AM
XML elements to JavaScript Array elements Conversion P XML 1 07-07-2006 09:08 PM
CHtmlView: How to read html text before display, change and give to display changed html code? Marek Kurowski C Programming 1 08-18-2004 06:41 PM
ASP.NET: One Solution: Simple HTML and Form Components Do Not Display in Browser Kelly ASP .Net 1 11-20-2003 04:08 PM
Passing form elements from/to HTML pages via JavaScript... Kevin Lyons Javascript 1 10-14-2003 11:12 PM



Advertisments