Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8

Thread: Accept Terms

  1. #1
    New Coder
    Join Date
    Jul 2006
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Accept Terms

    I have a script on my site that the user needs to check the I agree box in order for the submit button to be active.

    I am looking to have that changed due to legal reasons, we need to have a text area that the person must scroll to the bottom to read the terms and once they reach the bottom the submit button would become active

    If anyone could point me in the right direction, that would be much appreciated

    Thanks
    Justin

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,610
    Thanks
    0
    Thanked 645 Times in 635 Posts
    The best cross browser solution would be to put the "Accept" button at the bottom of the scroll area where it is only visible once the area has been scrolled right down.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    Regular Coder
    Join Date
    Jan 2003
    Posts
    867
    Thanks
    4
    Thanked 8 Times in 8 Posts
    Code:
    <form name="myform">
    <input type="checkbox" name="mycheckbox" onclick="this.form.mySubmitButton.disabled=(!this.checked);">
    <br>
    <input type="submit" disabled="true" name="mySubmitButton">
    </form>

  • #4
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,610
    Thanks
    0
    Thanked 645 Times in 635 Posts
    How is someone without Javascript supposed to enable that button in order to submit it. That code effectively blocks 10% of visitors from ever being able to agree to the terms.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #5
    Regular Coder
    Join Date
    Jan 2003
    Posts
    867
    Thanks
    4
    Thanked 8 Times in 8 Posts
    I have little sympathy for those who are too stupid, paranoid, or technologically impaired to run javascript.

  • #6
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,610
    Thanks
    0
    Thanked 645 Times in 635 Posts
    A large portion of those 10% are those who are too physically impaired to use Javascript and don't fall into any of those categories that you have no sympathy for (if there is anyone in any of those groups at all since the stupid and technologically impared don't know how to turn javascript off and the paranoid security consious users run a browser where Javascript security isn't an issue).

    I suggest that you blindfold yourself the next time that you are using your computer and see how far you get with javascript them. Blind people have been known to sue web site owners because of not being able to access portions of their site where their country's antidiscrimination laws give them the right to do so.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #7
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,037
    Thanks
    0
    Thanked 250 Times in 246 Posts
    CSS based solution. Scripting not needed.
    Code:
    <html>
    <head>
    <style type="text/css">
    #terms {
      width:300px;
      height:300px;
      overflow:auto;
      border: 1px solid silver;
    }
    </style>
    </head>
    <body>
    <form>
    <div id="terms">
      Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.
    
      <div>
         <input type="submit" name="btnAccept" value="Accept" />
      </div>
    </div>
    </form>
    </body>
    </html>

  • #8
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,910
    Thanks
    203
    Thanked 2,531 Times in 2,509 Posts
    Quote Originally Posted by felgall
    A large portion of those 10% are those who are too physically impaired to use Javascript and don't fall into any of those categories that you have no sympathy for (if there is anyone in any of those groups at all since the stupid and technologically impared don't know how to turn javascript off and the paranoid security consious users run a browser where Javascript security isn't an issue).

    I suggest that you blindfold yourself the next time that you are using your computer and see how far you get with javascript them. Blind people have been known to sue web site owners because of not being able to access portions of their site where their country's antidiscrimination laws give them the right to do so.
    I visited "ask Felgall" which informs me:-
    "....but you will want to keep Javascript enabled as many pages will require it to give you the full functionality of the page." Well, yes.

    I must confess that I do not see how a person who is totally or virtually blind so as to be unable to read the screen can use a computer at all. Or have I missed something? I have just tried switching the text size of this forum to "largest" but nothing alters.

    I am naturally sorry for people who are disabled in any way, but they surely must learn to live with that disability if it cannot be overcome.
    Last edited by Philip M; 07-08-2006 at 07:35 AM.


  •  

    Posting Permissions

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