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 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Accept Terms checkbox and submitting

    I'm trying to put an accept terms checkbox on my site using the following code:

    All chevrons have been replaced with [ ] so it will show up here

    In the head of my document:
    (script info and tags)

    [!--

    //Accept terms & conditions script (by InsightEye www.insighteye.com)
    //Visit JavaScript Kit (http://javascriptkit.com) for this script & more.

    function checkCheckBox(f){
    if (f.agree.checked == false )
    {
    alert('Please check the box to continue.');
    return false;
    }else
    return true;
    }
    //--]

    /SCRIPT
    Last edited by Athena; 01-09-2005 at 10:02 PM. Reason: script is coming through

  • #2
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have to reply to my own because apparently I can't even figure out how to post parts of code. Here's what I posted in my body html


    [P] Check here if you agree to these terms:
    [form action="http://www.anizona.org/agreefull.html" method="GET" onsubmit="return checkCheckBox(this)"]

    I accept: [input type="checkbox" value="0" name="accept"]
    [input type="submit" value="Submit form"]
    [/form]

    It all appears to work, however, when it pulls the url up it adds ?agree=0 to the end of it. Which of course means it's not pulling my page up, just the 404 page. When I remove name="accept" from the code, it just adds the ? on the end of the URL so it's still not pulling the page up. How do I get it to NOT add anything onto the end of the url when it pulls it up? Any help would be appreciated since I am not great with Javascript. Thanks.

  • #3
    teh Moderatorinator
    Join Date
    Sep 2004
    Location
    USA
    Posts
    2,472
    Thanks
    4
    Thanked 40 Times in 40 Posts
    Change your form method to post instead of get.

  • #4
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well it did get rid of the question mark, now I'm getting a new error.

    Method Not Allowed
    The requested method POST is not allowed for the URL /register/full/accept.html.

    Thanks for trying to help.

  • #5
    teh Moderatorinator
    Join Date
    Sep 2004
    Location
    USA
    Posts
    2,472
    Thanks
    4
    Thanked 40 Times in 40 Posts
    Sounds to me like it has something to do with your webserver configuration.

  • #6
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, I was thinking the same thing and e-mailed my hosting service technical support on the issue. Quite frustrating to be so close.


  •  

    Posting Permissions

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