- Treytor
- Feb 8, 2003
-
Enjoy, uh... refreshing time!
|
Would anyone know why this bit of code won't worry on a blackberry?
code:<script>
var checkobj
function agreesubmit(el){
checkobj=el
if (document.all||document.getElementById){
for (i=0;i<checkobj.form.length;i++){ //finds call button
var tempobj=checkobj.form.elements[i]
if(tempobj.type.toLowerCase()=="submit")
tempobj.disabled=!checkobj.checked
}
}
}
function defaultagree(el){
if (!document.all&&!document.getElementById){
if (window.checkobj&&checkobj.checked)
return true
else{
alert("Please read and accept the Terms and Conditions to place the call.")
return false
}
}
}
</script>
It's to enable the form submit button on a web page only after the check box is checked.
Is there a better way to accomplish this?
Edit: I'm sorry if this isn't the right thread for this, given my code is JavaScript on a webpage.
Treytor fucked around with this message at 07:55 on Apr 11, 2008
|
#
¿
Apr 11, 2008 07:52
|
|
- Adbot
-
ADBOT LOVES YOU
|
|
#
¿
May 6, 2024 05:51
|
|