logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > Javascript and JS frameworks
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 06-20-2011, 07:22 AM   #1
woofy
woofy's Avatar
 
Join Date: Dec 2007
Location: San Diego
Posts: 57
Default Is there anyway to restrict users from filling out forms who have Java disabled?

Is there anyway to restrict my users from filling out forms who have Java disabled? I have a form that works fine by limiting users who don't have enough credits from downloading restricted files to be inserted into their user profile. But all they need to do to get the file to be inserted into their database is disable javascript and the java script check form function won't work and they will be able to gain access to restricted files which are inserted into their database. I need to have it locked down to prevent this. A method which would prevent them from viewing that specific page if java script was disabled would be ideal. Any suggestions?
woofy is offline   Reply With Quote
Old 06-20-2011, 07:47 AM   #2
Corrosive
Corrosive's Avatar
 
Join Date: Feb 2008
Location: Bristol, England
Posts: 7,103
Default

Depends what you want to do when js is disabled but you can use a <noscript> tag to handle this. Example;

Code:
<noscript>
      <meta http-equiv="refresh" content="0;url=http://www.google.com" />
</noscript>
This will redirect to google home page but you could do something else, redirect to another page on your site or maybe hide the form.
Corrosive is offline   Reply With Quote
Old 06-20-2011, 06:37 PM   #3
m1a2x3x7
m1a2x3x7's Avatar
 
Join Date: Mar 2007
Posts: 297
Default

Here's what I would do...

1. The div that contains for form, have it set to display none with CSS.
2. Have another div that is shown and says "You must have JavaScript enabled to view this form."
3. Use JavaScript to change the div that holds the form to display:block and hide the div with the no JavaScript message.

If the form displays then the user has JavaScript enabled. If the form doesn't display then they don't have it enabled and the message tells them to enable it.

If you need help writing it, let me know. I can whip something up for ya.

-M
__________________
Chris Schultz
Web and Multimedia Designer
Schultz|Studio
m1a2x3x7 is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:05 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com