Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #26571

Re: <noscript> problem

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From "Christoph M. Becker" <cmbecker69@arcor.de>
Newsgroups comp.lang.javascript
Subject Re: <noscript> problem
Date Tue, 13 Jan 2015 18:12:32 +0100
Organization solani.org
Lines 24
Message-ID <m93jlv$2fs$1@solani.org> (permalink)
References <chkuofFkr3cU1@mid.individual.net>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
X-Trace solani.org 1421169151 2556 eJwFwYEBwDAEBMCVkuAxDq/2H6F3JrigKwxqa3vysRA2QaBdL8lK1Mv9rNKPrI8quykx4z8g8BGg (13 Jan 2015 17:12:31 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Tue, 13 Jan 2015 17:12:31 +0000 (UTC)
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0
X-User-ID eJwFwYEBwCAIA7CXRGhx51DQ/09YAqexMwgGHp73LV93EtvG5jtbmhIXdKga6GaY3Bi9mfEDLKwRTQ==
In-Reply-To <chkuofFkr3cU1@mid.individual.net>
Cancel-Lock sha1:6U2dX8Pm+JiV38fUIRIgFmtOWc8=
X-NNTP-Posting-Host eJwFwQERADEIAzBL7aDAy+HY8C/hE1kwJj0UrtWeYrrmbkB4Lrah/GP34J6XbcPSAnytXP0HVBCL
Xref csiph.com comp.lang.javascript:26571

Show key headers only | View raw


Mel Smith wrote:

>    What is a correct and simple way to hide this button if scripting is 
> disallowed in a browser ?

Just turn the question around: what is a correct and simple way to show
a hidden button if scripting is available in a browser?  That's rather
easy to accomplish:

  <button id="my_button" style="display: none">Label</button>
  <script>
    document.getElementById("my_button").style.display = ""
  </script>

However, it is even better to avoid hidden buttons, that require browser
side scripting to be useful, in the first place (consider CSS being not
available), so the following solution comes to mind:

  <script>
    document.write('<button id="my_button">Label<\/button>');
  </script>

-- 
Christoph M. Becker

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

<noscript> problem "Mel Smith" <syntel@cox.net> - 2015-01-13 09:17 -0700
  Re: <noscript> problem Tim Streater <timstreater@greenbee.net> - 2015-01-13 16:58 +0000
    Re: <noscript> problem "Mel Smith" <syntel@cox.net> - 2015-01-13 13:15 -0700
      Re: <noscript> problem "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2015-01-13 22:39 +0200
        Re: <noscript> problem "Mel Smith" <syntel@cox.net> - 2015-01-13 17:48 -0700
          Re: <noscript> problem Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-01-14 09:30 -0200
            Re: <noscript> problem Tim Streater <timstreater@greenbee.net> - 2015-01-14 12:07 +0000
              Re: <noscript> problem Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-01-14 10:50 -0200
                Re: <noscript> problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-01-14 15:53 +0100
  Re: <noscript> problem "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-01-13 18:12 +0100
    Re: <noscript> problem "Mel Smith" <syntel@cox.net> - 2015-01-13 13:19 -0700
  Re: <noscript> problem Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-01-13 15:18 -0200
  Re: <noscript> problem "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2015-01-13 19:30 +0200
    Re: <noscript> problem Erwin Moller <erwinmollerusenet@xs4all.nl> - 2015-01-14 15:19 +0100
      Re: <noscript> problem "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2015-01-14 17:13 +0200
  Re: <noscript> problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-01-13 18:48 +0100
    Re: <noscript> problem "Mel Smith" <syntel@cox.net> - 2015-01-13 11:58 -0700
    Re: <noscript> problem John Harris <niam@jghnorth.org.uk.invalid> - 2015-01-14 14:47 +0000
      Re: <noscript> problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-01-15 14:49 +0100
        Re: <noscript> problem Tim Streater <timstreater@greenbee.net> - 2015-01-15 15:31 +0000
          Re: <noscript> problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-01-15 17:30 +0100
            Re: <noscript> problem Tim Streater <timstreater@greenbee.net> - 2015-01-15 16:38 +0000
              Re: <noscript> problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-01-15 18:31 +0100
                Re: <noscript> problem Tim Streater <timstreater@greenbee.net> - 2015-01-15 17:35 +0000
                Re: <noscript> problem John Harris <niam@jghnorth.org.uk.invalid> - 2015-01-15 20:00 +0000
                Re: <noscript> problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-01-15 22:19 +0100
                Re: <noscript> problem John Harris <niam@jghnorth.org.uk.invalid> - 2015-01-16 09:23 +0000
                Re: <noscript> problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-01-17 12:23 +0100
                Re: <noscript> problem John Harris <niam@jghnorth.org.uk.invalid> - 2015-01-17 20:09 +0000
                Re: <noscript> problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-01-17 22:54 +0100
                Re: <noscript> problem John Harris <niam@jghnorth.org.uk.invalid> - 2015-01-18 12:16 +0000
                Re: <noscript> problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-01-18 17:26 +0100
                Re: <noscript> problem Tim Streater <timstreater@greenbee.net> - 2015-01-18 16:50 +0000
                Re: <noscript> problem John Harris <niam@jghnorth.org.uk.invalid> - 2015-01-19 10:17 +0000
                Re: <noscript> problem Tim Streater <timstreater@greenbee.net> - 2015-01-19 10:40 +0000
        Re: <noscript> problem John Harris <niam@jghnorth.org.uk.invalid> - 2015-01-15 19:53 +0000
          Re: <noscript> problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-01-15 22:17 +0100
            Re: <noscript> problem John Harris <niam@jghnorth.org.uk.invalid> - 2015-01-16 09:59 +0000
              Re: <noscript> problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-01-17 13:02 +0100
                Re: <noscript> problem John Harris <niam@jghnorth.org.uk.invalid> - 2015-01-18 16:10 +0000
                Re: <noscript> problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-01-19 15:10 +0100
                Re: <noscript> problem John Harris <niam@jghnorth.org.uk.invalid> - 2015-01-20 10:24 +0000
                Re: <noscript> problem Tim Streater <timstreater@greenbee.net> - 2015-01-20 12:09 +0000

csiph-web