SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Threaded View

  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2002
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Validation form HELP!!!

    here is my javascript and html code

    Code:
    <script language="javascript">
    
    function check() {
    var a1=document.form1.fname.value;
    var a2=document.form1.lname.value;
    var a3=document.form1.email.value;
    var a4=document.form1.phone_number.value;
    var a5=document.form1.usern.value;
    var a6=document.form1.pass.value;
    var a7=document.form1.ip.value;
    var a8=document.form1.type.value;
    
    
        if(a1&&a2&&a3&&a4&&a5&&a6&&a7) {return true;}
        else { alert("Όλα τα πεδία εκτός από\n την κατηγορία\n είναι απαραίτητα"); return false;}
    
        }
    
    </script>
    
    
    
    
    <form name='form1' method='post' action='' onSubmit='return check()'><td>Ονομα</td><td><input type="text" name='fname' size="20">
    Επίθετο<input type="text" name='lname' size="20">
    E-mail<input type="text" name='email' size="20">
    Τηλέφωνο<input type="text" name='phone_number' size="20">
    IP<input type="text" name='ip' size="20">
    Username<input type="text" name='usern' size="20">
    Password<input type="password" name='pass' size="20">
    Κατηγορίες<select name='category[]' multiple><option value='1'>1<option value='2'>2<option value='3'>3</select>
    Τύποι Ανακοίνωσης
    <select name='type[]' multiple><option value='1'>Α<option value='2'>B<option value='3'>C<option value='4'>D</select>
    <input type='submit' value='Submit' name='submit' >
    </form>
    I cant validate that from. I want all fields to be filled except to name='category[]'
    Last edited by jonsof; Mar 16, 2003 at 08:33.


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
  •