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

Discussion in 'Javascript' started by patricksabourin@hotmail.com, Jul 28, 2006.

  1. Guest

    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, 2006
    #1
    1. Advertising

  2. web.dev Guest

    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.
     
    web.dev, Jul 28, 2006
    #2
    1. Advertising

  3. Randy Webb Guest

    Re: When JavaScript is disabled, do not display HTML form and formelements

    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/
     
    Randy Webb, Jul 28, 2006
    #3
  4. Randy Webb Guest

    Re: When JavaScript is disabled, do not display HTML form and formelements

    web.dev said the following on 7/28/2006 6:10 PM:
    > 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/
     
    Randy Webb, Jul 28, 2006
    #4
  5. web.dev Guest

    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.
     
    web.dev, Jul 28, 2006
    #5
  6. Guest

    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, 2006
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marek Kurowski
    Replies:
    1
    Views:
    1,005
    Mark A. Odell
    Aug 18, 2004
  2. SirG
    Replies:
    5
    Views:
    437
    Jonathan N. Little
    Nov 15, 2007
  3. Ittay Dror

    how to submit "disabled" form elements

    Ittay Dror, Apr 19, 2004, in forum: Javascript
    Replies:
    0
    Views:
    123
    Ittay Dror
    Apr 19, 2004
  4. Mel
    Replies:
    4
    Views:
    100
  5. Kevin Blount
    Replies:
    27
    Views:
    261
    Richard Maher
    Sep 13, 2009
Loading...

Share This Page