Results 1 to 2 of 2

Thread: i need help with this code

  1. #1
    Join Date
    Jul 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default i need help with this code

    i got a code called "acept terms" from dynamic drive..its code where u agree to the terms... i'm havin some troubles with this code..the problem is whenever u press submit nothing happens...what i want is..when ever u press submit..i want it to pm me who ever presseed sumbit so i can know...or if thts not possiable...i want it to show the forums section...like i will make it dissaper and after when someone presses sumbit you will able to see the forums section...u know wat i'm tryin to say. or if theres another way and a better way that will help also...thx

    heres the code http://www.dynamicdrive.com/dynamici...acceptterm.htm

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Well you have two basic options:

    1 ) Specify an action and a method for the form and have these carry out your desired results upon acceptance of the terms.

    2 ) Edit:
    Code:
    function defaultagree(el){
    if (!document.all&&!document.getElementById){
    if (window.checkobj&&checkobj.checked)
    return true
    else{
    alert("Please read/accept terms to submit form")
    return false
    }
    }
    }
    changing return true to whatever command or set of commands you wish to be carried out upon acceptance of the terms. If including more than one command, surround these with the curly braces:
    Code:
    function defaultagree(el){
    if (!document.all&&!document.getElementById){
    if (window.checkobj&&checkobj.checked){
    do something on this line;
    do another thing here;
    }
    else{
    alert("Please read/accept terms to submit form")
    return false
    }
    }
    }
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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