Activity Stream
48,167 MEMBERS
65132 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 10 of 17

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1.     
    #1
    Banned
    Website's:
    pHpd.in
    Code: 
     <html>
    <head>
    <script type="text/javascript">
    function CheckMyEmail()
    {
    var x=document.forms["myForm"]["email"].value;
    var value=("BC102034568");
    var at=x.indexOf("@");
    var dot=x.lastIndexOf("vu.edu.pk");
    if (at<1 || dot<at+1 || dot+2>=x.length)
    {
    alert("This is Not your valid VU e-mail address");
    return false;
    }
    else
    {
        if(x="BC102034568@vu.edu.pk")
            {
            alert("This is your valid VU e-mail address");
            }
    }
    }
    </script>
    </head>
    
    <body>
    <form name="myForm" action="example.html" onsubmit="return CheckMyEmail();" method="post">
    Email: <input type="text" name="email">
    <input type="submit" value="Submit">
    </form>
    </body>
    
    </html>
    Nov?thor Reviewed by Nov?thor on . Help Need In Making Assisgnment JavaScript Hello i got assignment from my university i am not able to make it properly doing some mistakes well got this assignment Make a form in HTML document containing only one field named as Email and one Submit Button. Write your own JavaScript function to validate the email address. The Validation should be as follows: It must accept only your VU Student email address i.e; it must not accept any other student’s VU email address. Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    TeamUploads.com GamerW.net
    Quote Originally Posted by Nov?thor View Post
    Code: 
     <html>
    <head>
    <script type="text/javascript">
    function CheckMyEmail()
    {
    var x=document.forms["myForm"]["email"].value;
    var value=("BC102034568");
    var at=x.indexOf("@");
    var dot=x.lastIndexOf("vu.edu.pk");
    if (at<1 || dot<at+1 || dot+2>=x.length)
    {
    alert("This is Not your valid VU e-mail address");
    return false;
    }
    else
    {
        if(x="BC102034568@vu.edu.pk")
            {
            alert("This is your valid VU e-mail address");
            }
    }
    }
    </script>
    </head>
    
    <body>
    <form name="myForm" action="example.html" onsubmit="return CheckMyEmail();" method="post">
    Email: <input type="text" name="email">
    <input type="submit" value="Submit">
    </form>
    </body>
    
    </html>
    Thanks buddy but when i put xyz@vu.edu.pk it show me valid address. i only wanna make BC102034568@vu.edu.pk valid address all other values and email address must be show invalid.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [WordPress] How to do this in javascript/php?
    By thizzladen in forum Web Application/Script Support
    Replies: 0
    Last Post: 16th Mar 2012, 12:05 AM
  2. Partner for making a stream / money making site.
    By S?nic in forum Community Cooperative
    Replies: 21
    Last Post: 6th Jan 2012, 10:39 PM
  3. [Hiring] 50 $ for making Javascript addon exactly like this ( latest posts )
    By TheTorrentSeller in forum Completed Transactions
    Replies: 6
    Last Post: 1st May 2011, 05:45 PM
  4. Need Javascript Help
    By Netguy in forum Web Development Area
    Replies: 7
    Last Post: 19th Mar 2011, 03:24 PM
  5. Help About JavaScript
    By macypro in forum Technical Help Desk Support
    Replies: 1
    Last Post: 7th Dec 2010, 12:23 AM

Tags for this Thread

BE SOCIAL