We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

Question 1         [20 marks]

 

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:

 

  1. It must accept only your VU Student email address i.e; it must not accept any other student’s VU email address.
  2. It must show alert on acceptance or denial of the email address after validation.
  3. The name of the function should contain your student ID like CheckEmail_BC102034568.
  4. If you enter your wrong student email id then it must show alert as well.
  5. It must accept your student ID only at vu.edu.pk, means if you enter BC102034568@hotmail.com then it must not accept it.
  6. There must be unique alerts for each error; like if the length of the student ID is larger or smaller than the original ID then the alert should be according to that.
  7. During each alert, the entered email address must also be shown in the alert box like: “BC102034560000008@vu.edu.pk is not your Valid Email address”

 

Hint: See the attached sample html file for simply checking @ and dot in an email address.

 

 

Note:

 

  • Assignment should be done by your own efforts, not copied from net, handouts or books.

 

  • You should submit your html file as well as word file containing the code, zip the both files in one single file and upload via your assignment interface.

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 3626

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Replies to This Discussion

</html>
copy kr k deikh to lyen. 

koi batae ga html code ko kese open karna he

mene note pad pe copy paste bi kia aur us file ko index.html ka naam dia

par open karne par yeh code hi khulta he webpage nahi

open with.... bhi kia but yeh code hi khulta he

bro solution  is trha snd kre k jiss jaga pe changing krni ha abt id ose highlight kr de ya font color change kr de ta k easy ho jye

<html>
<head>
<title>Virtual University of Pakistan</title>
<script type="text/javascript">
function CheckEmail_bc000000000()
{
var email = document.forms["MyForm"]["email"].value;
var vum = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{1,4})$/i;
var vuid = /^(bc120202300)\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{1,4})$/i;
var dom = /^([A-Za-z0-9_\-\.])+\@(vu.edu.pk)$/i;
var alt = "This is your valid vu E-Mail address";
var check = '';

if(vum.test(email))
{
if(vuid.test(email) === false)
{
check += "Please enter a valid user ID (bc000000000). \r\n";
}
if(dom.test(email) === false)
{
check += "Please enter a valid domain (vu.edu.pk). \r\n";
}
if (check !== "")
{
alt = "Some problem encountered . \r\n";
alt += check;
}
}

else

{
alt = "(please enter valid user ID).";
}
alert(alt + "\r\n\r\nInput Email:\r\n" + email);
}
</script>
</head>

<body >


<form name="MyForm" action="" onsubmit="return CheckEmail_bc000000000();" method="post">
E-mail: <input type="text" name="email">
<input type="submit" value="Submit">
</form>
</body>
</html>

nhi horaha mjhse :( :( :(

ho gia h open aram say ap try kar k daikhain.

RSS

© 2020   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service

.