www.webdeveloper.com
Results 1 to 2 of 2

Thread: Disable submit button if Cookies not enable

  1. #1
    Join Date
    Mar 2013
    Posts
    18

    Disable submit button if Cookies not enable

    Is there a way I can disable the submit button with javascript if cookies are not enable? I am passing some information with session to a form and if cookies are disabled the data will not pass to the form. thx.

  2. #2
    Join Date
    Apr 2013
    Posts
    56
    This should do the trick:

    Code:
    var cookieEnabled = (navigator.cookieEnabled) ? true : false;
    From here you can do whatever you want. In your case you can disable submit button if cookieEnabled variable is set to false.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles