You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by avchavan <av...@yahoo.co.in> on 2015/02/25 15:07:59 UTC

Detecting if javascript is disabled

Is there a way in which i can check if the JavaScript of the browser is
disabled or not and take appropriate action?

I have a requirement wherein i need to show all the data which i'll be
hiding by default in case the JavaScript is enabled.

Thanks.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Detecting-if-javascript-is-disabled-tp4669761.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Detecting if javascript is disabled

Posted by Sven Meier <sv...@meiers.net>.
Hi,

you can use RequestCycleSettings#gatherExtendedBrowserInfo or 
AjaxClientInfoBehavior to detect Javascript support.

Note that there seems to be some confusion about 
ClientProperties#javaEnabled:

http://stackoverflow.com/questions/10084401/javascript-detection-not-working-anymore

Don't use this, it just shows *Java* support in the browser. You can 
check any other non-primitiv property of ClientProperties - if it's 
non-null, JavaScript is supported.

Have fun
Sven


On 25.02.2015 15:07, avchavan wrote:
> Is there a way in which i can check if the JavaScript of the browser is
> disabled or not and take appropriate action?
>
> I have a requirement wherein i need to show all the data which i'll be
> hiding by default in case the JavaScript is enabled.
>
> Thanks.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Detecting-if-javascript-is-disabled-tp4669761.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org