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.

<html>
<head>
<script>
//If u hav ny problm text me i'l try my best thnx n plz dont just copy paste try to understand :) : Illusionist 03236462646
function form()
{
var uid = document.registration.userid;
var passid = document.registration.passid;
var uname = document.registration.username;
var ucountry = document.registration.country;
var uemail = document.registration.email;
var umsex = document.registration.msex;
var ufsex = document.registration.fsex;
if(userid_validation(uid,5,12))
{
if(passid_validation(passid,7,12))
{
if(allLetter(uname))
{
if(countryselect(ucountry))
{
if(ValidateEmail(uemail))
{
if(validsex(umsex,ufsex))
{
}
}
}
}
}
}
return false;

} function userid_validation(uid,mx,my)
{
var uid_len = uid.value.length;
if (uid_len == 0 || uid_len >= my || uid_len < mx)
{
window.alert("User Id should not be empty / length be between "+mx+" to "+my);
uid.focus();
return false;
}
return true;
}
function passid_validation(passid,mx,my)
{
var passid_len = passid.value.length;
if (passid_len == 0 ||passid_len >= my || passid_len < mx)
{
window.alert("Password should not be empty / length be between "+mx+" to "+my);
passid.focus();
return false;
}
return true;
}
function allLetter(uname)
{
var letters = /^[A-Za-z]+$/;
if(uname.value.match(letters))
{
return true;
}
else
{
window.alert('Name must have alphabet characters only');
uname.focus();
return false;
}
}
function countryselect(ucountry)
{
if(ucountry.value == "Default")
{
window.alert('Select your country from the list');
ucountry.focus();
return false;
}
else
{
return true;
}
}
function ValidateEmail(uemail)
{
var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
if(uemail.value.match(mailformat))
{
return true;
}
else
{
window.alert("Please enter valid email address!");
return false;
}
} function validsex(umsex,ufsex)
{
x=0;

if(umsex.checked)
{
x++;
}
if(ufsex.checked)
{
x++;
}
if(x==0)
{
window.alert('Select Male/Female');
umsex.focus();
return false;
}
else
{
window.alert('Form Succesfully Submitted');
window.location.reload()
return true;
}
}
</script>
</head>
<body>
<h1>Registration Form</h1>
<form name='registration' method="post"  onSubmit="form();" action="http://www.vu.edu.pk">
<OL>
<table><tr>
<td><label for="userid">User id:</label></td></tr>
<tr><td><input type="text" name="userid" size="12" /></td></tr>
<tr><td><label for="passid">Password:</label></td></tr>
<tr><td><input type="password" name="passid" size="12" /></td><tr>
<tr><td><label for="username">Name:</label></td></tr>
<tr><td><input type="text" name="username" size="50" /></td></tr>
<tr><td><label for="country">Country:</label></td></tr>
<tr><td><select name="country">
<option selected="" value="Default">(Please select a country)</option>
<option value="value1">USA</option>
<option value="value2">India</option>
<option value="value3">Germany</option>
<option value="value4">Bangladesh</option>
<option value="value5">Turkey</option>
</select></td></tr>
<tr><td><label for="email">Email:</label></td></tr>
<tr><td><input type="text" name="email" size="50" /></td></tr>
<tr><td><label id="gender">Gender:</label></td></tr>
<tr><td><input type="radio" name="msex" value="Male" onclick="document.registration.fsex.checked=false;" /><span>Male</span></td></tr>
<tr><td><input type="radio" name="fsex" value="Female" onclick="document.registration.msex.checked=false;"/><span>Female</span></td></tr></table>
<br>
<br>
<table><tr><td><input type="submit" name="submit" value="Submit"/></td>
<td><input type="reset" value="Reset"></td></tr></table>
</ol>
</form>
</body>
</html>

+ 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: 4712

.

+ 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)

Attachments:

Replies to This Discussion

great . but dear ... User id me ALPHNUMERIC charachter ko kesey rokey gey? I cant .. 

ap ney ik function call ker k usi me tamam cheks lagaee han.. is it the ORIGINAL assignment requirement ya phir Alag alag bhi apley ker saktey hain? ye steps complicated lug rahey hain mujhey .. :(
aik aur bat...

                                     ...if (document.form1.userid.value.length < 4 )

{alert("User id should not be empty / length between 5 to 12");}

is me less than 5 characters ka tou chek lga liya, but 12 sey ziyada ko kesy stop kertey hain " || "  use kerna hai ? 

 

if (document.form1.userid.value.length<4 || document.form1.userid.value.length>12 )  ?? ye tou nahi ho raha ?

 

 

tabish anjum bro usr id mein alphanumeric ki rrestriction deni ni assignment ki ro se merey knowledge k mutabiq

aur ap alaag alag bhi likh sktey hain itz ok sath mein likhny se code precise ho gaya hai

han g || ka use karein

aur variable declr karein pehley ap document.form1.userid.value.length k liye takeh code precise ho jaey

like      var uszid = document.form1.userid.value.length

aur phr uszid ko if statement mein use krein

Hmen LMS pr sirf index.html wali file submit krni thi na? Koi please bta dy kyunk menay wohi file submit karai hy...

THANKS....

nai word file man likh k jasay assignment ap submit karti ho wasy hi karni hai 

ni ms word mn ni Talha ., notepad men

nai assignment mein clear lekha howa ha index.html or html file submit krne ha

ms word ya  notepad jis mein bhi chahey code paste kro kuch farq nahi siwaey is k k note pad bht easy hai aisey codes mein formatting ki to zaroorat hoti nhi bs simple text editor ki zarorat hoti hai so note pad best hai ......... han save is ko .html ya .htm mein krna hai aur submit bhi yehi .html ya .htm wali file hi karani hai

Samra sis notepad mn likh kr usy .Html mn save kr k submit krvani thi .

samra ap ne thik kia hai .html wali file hi submit krani thi

all guys Illusionist did gud work theek hy sub iss main 

AND

For Illusionist you did gud work, aap ka ye solution meray pass check honay k liay aaia tha iss main yehi error mila mujy and ik ye b hey k jb b koi alert chalay to means return false jaye to form ko submit nai hona chahaaye but ye ho jata hey iss ka solution hope so ap ney b try kya ho gaa ager kia hey oor nai hoa aap sy thn try this onSubmit="return(form());"  and JS code main jitnay b retune false hey unn sub main "()" ye brackets yaa to khatum ker doo yaa sub main apply kro .

Illusionist radio button ka name same hona chahiey jaisay aap ney name differnt rakhay hey uss sy dono radio buttons at a time select/check ho jatay hey and that is wrong , take ur time guys, have a nice time .... :)

how to change country names?

RSS

Latest Activity

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

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

.