Visualizzazione dei risultati da 1 a 3 su 3
  1. #1
    Utente di HTML.it
    Registrato dal
    Mar 2006
    Messaggi
    5

    Problemone che per voi è sicuro na stupidata.

    Ciao a tutti raga, è un po che non bazzicavo ma sono incappato in un problema e non so come risolvere perche non conosco quasi per nulla il javascript.
    Ora vi mostro:

    Premessa, stò utilizzando Dreamweaver MX e stò facendo dei controlli su un for ma non so perchè non mi vanno.

    Ecco lo script:

    <head>
    <script type="text/JavaScript">
    <!--
    function MM_findObj(n, d) { //v4.01
    var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
    if(!x && d.getElementById) x=d.getElementById(n); return x;
    }

    function MM_validateForm() { //v4.0
    var i,p,q,nm,test,num,min,max,errors='',args=MM_valida teForm.arguments;
    for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
    if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
    if (p<1 || p==(val.length-1)) errors+='- '+nm+' deve contenere un indirizzo email valido.\n';
    } else if (test!='R') { num = parseFloat(val);
    if (isNaN(val)) errors+='- '+nm+' deve contenere un numero telefonico valido.\n';
    if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
    min=test.substring(8,p); max=test.substring(p+1);
    if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' non compilato.\n'; }
    } if (errors) alert('Sono presenti i seguenti errori:\n'+errors);
    document.MM_returnValue = (errors == '');
    }
    function validate_form1(form1)
    { if(form1.privacy[11].checked) { return true;
    } else { alert("Attenzione:\ncontrollare l'accettazione.");
    return false;
    }
    //-->
    </script>
    </head>

  2. #2
    Utente di HTML.it
    Registrato dal
    Mar 2006
    Messaggi
    5
    me ne sega un pezzo, provo a postarlo sotto:

    /**
    *<body>
    *<form action="http://MIO SITO" method="post" name="form1" id="form1" onsubmit="javascript:return validate_form1(this);">
    *<INPUT name=recipient type=hidden value="MIA MAIL">
    *<INPUT name=return_link_title type=hidden value="http://MIO SITO">
    *<INPUT name=return_link_url type=hidden value=MIO SITO>
    *<input type="hidden" name="env_report" value="REMOTE_HOST,HTTP_USER_AGENT">
    *<input type="hidden" name="redirect" value="MIO SITO">

  3. #3
    Utente di HTML.it L'avatar di Xinod
    Registrato dal
    Sep 2000
    Messaggi
    13,649
    tu chiaramente non lo sai, ma c'e' un regolamento che vieta titoli poco significativi ed esplicativi come questo,
    quindi vallo a leggere prima di ritrovare altre discussioni chiuse

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.