1

We need to check if javascript is enabled in user's browser and display some fancy static page with error if it's not. Currently we use the 'noscript' tag approach along with redirection in the header, like:

<noscript>
    <meta http-equiv="Refresh" content="0; URL=JavaScriptDisabledPage" />
</noscript>

The problem is that sf somehow detects that js is not enabled by itself and modifies html tag of each page by hiding all the content, like:

<html style="display:none !important;">

As result user would see just an empty page if js is disabled. It's same behaviour as for internal sf page, as for community one.

We are trying to fight standard sf behaviour but without success so far. Any help would be appreciated, and thanks in advance.

1 Answer 1

1

Solved the problem by setting applyHtmlTag & applyBodyTag attributes of the page element to false and providing the whole page markup by myself, like:

<apex:page id="javaScriptDisabledPage" applyHtmlTag="false" applyBodyTag="false" sidebar="false" showHeader="false" title="JavaScript Disabled" standardStylesheets="false" >

    <html>

        <head>
        </head>


        <body>

            <div>
                <img id="javascript_disabled_image" src="{!URLFOR($Resource.MainDesign, 'images/javascript_disabled.png')}" />
            </div>

        </body>

    </html>

</apex:page>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .