Log in

View Full Version : i need help with this code



refresh
07-31-2005, 08:01 AM
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/dynamicindex16/acceptterm.htm

jscheuer1
07-31-2005, 01:12 PM
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:

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:

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
}
}
}