Jump to content

[SOLVED] JavaScript and PHP


timmy0320

Recommended Posts

Alright, so I have been looking and looking and came across that it's impossible to check if JavaScript is Enabled or not via PHP because it is server-side. What I am trying to do is for my registration page, I have some AJAX on the site (checking username, pw strength, etc.) but I want register.php to do an IF javascript=enabled show registration with ajax ELSE javascript=disabled show registration without AJAX.

 

The only way I have found to come remotely close to this would be to make a module and on every page that links to register.php have a link such as:

a href="register.php?pg=nojava" onclick="window.location='register.php';return false;"

 

I do NOT want to do that. Is there a way I can link do my main objective with the IF ELSE instead of creating a module? Because if I do the module I then have to figure out a way to code register.php?pg=nojava to someway say that their java is enabled if they try to remotely access it through the browser. Which brings me back to point A. Get my jist of things?

 

Thanks for any help you can provide.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.