Morpheusweb.it - Risorse per webmaster: script, ASP.NET, C#, Visual Basic .Net, tutorial, asp, javascript, css, php, html, java, ADO, VBScript, forms, frames, Active Server Pages, Dynamic HTML, database, gratis per webmaster e webdesigner

Do you accept the conditions?

Form that doesn't allow to press submit if you doesn't accept the conditions.


<script>
var checkobj
function agreesubmit(el){
checkobj=el
if (document.all||document.getElementById){
for (i=0;i<checkobj.form.length;i++){ //hunt down submit 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/accept terms to submit form")
return false
}
}
}
</script>
<form name="agreeform" onSubmit="return defaultagree(this)">
<br>Qui va il resto del form, comprese le condizioni...<br><br>
<input name="agreecheck" type="checkbox" onClick="agreesubmit(this)"><b>Ho letto ed accetto le condizioni</b><br>
<input type="Submit" value="Submit!" disabled>
</form>
<script>
//change two names below to your form's names
document.forms.agreeform.agreecheck.checked=false
</script>


Download the code...


Print


 

Inizio pagina

risorse per webmaster

dhtml

dhtml

dhtml, mail, forms,
dhtml, menu,

Vai nel sito Morpheusweb.it - Risorse per Webmaster troverai quello che stai cercando

dhtml, menu,
Nel nostro sito molte informazioni: "Morpheusweb.it - Risorse per Webmaster" tratta di dhtml, script, tendina, mail, forms
click here se non sei reindirizzato automaticamente al nostro sito.

dhtml, script, tendina, mail, forms, , ,