Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7171795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:29:08+00:00 2026-05-28T15:29:08+00:00

I was trying to use <script> <noscript> checks inline with my PHP to render

  • 0

I was trying to use <script> <noscript> checks inline with my PHP to render different form elements depending on weather or not someone has javascript enabled.

To display something to non enabled users only I can successfully use

<noscript> <?php ... ?> </noscript>

To display something to enabled users only I tried whats below but it does not work the same as above. Instead it allows all users to still see the PHP.

<script> <?php ... ?> </script>

How can I limit something to only those with javascript enabled without having two totally different pages?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T15:29:09+00:00Added an answer on May 28, 2026 at 3:29 pm

    You may be able to use something like this:

    <script>
        <?php
            ob_start();
            // ...
            $scriptOnlyData = ob_get_clean();
        ?>
        document.write(<?php echo json_encode($scriptOnlyData); ?>);
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use NuSoap in PHP 5.3. When I debug my script
I am trying to use the dynamic django form script from http://www.djangosnippets.org/snippets/714/ The dynamic
I'm trying to use prepared statements in a PHP script that accesses an SQLite3
I am trying to use a php script to only show a link, when
I'm trying to use a PHP script to login to another web site (a
I'm trying to use a shell script to start a command. I don't care
I am trying to use the following script in asp.net: <script language=javascript type=text/javascript> function
I'm trying to use NAnt/NAntContrib build script to build a web application on Windows
I am trying to use a third party script and extract the logged in
I'm trying to use the foreach loop in an Ant script but I get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.