cs 101 assignment # 3 complete with javascript.... by Pakeezah
Page 1 of 1 • Share
cs 101 assignment # 3 complete with javascript.... by Pakeezah
[You must be registered and logged in to see this image.]
some errors were reported in the assignment. i have fixed all the reported errors.
the errors, which were reported are as follow
1. name k sath jo right hand side per name aata hai wo pehlay "disabled" tha jo k "readonly" hona chahye tha.
ab wo theek kar k "readonly" kar dya gaya hai.
2. radio buttons jo gender ko show karte hain male aur female un mein problem report ki gaye thi k agar male
check kar k wapis female ko check kya jaye tou female check nahin hota. wo bi fix kar dya gaya hai. aap
check kar sakte hain..
3. hobbies mein jo 3 check boxes hain agar un ko check kar k un check kya jata tha tou right hand side wala
uncheck nahin hota tha wo bi set kar dya gaya hai. aap check kar sakte hain.
4. select box mein jab koi bi city select nahi hoti thi tb bi right side per jo text area tha us mein koi na
koi address reh jata tha... wo bi theek kar dya gaya hai...
======
Note
======
one thing jo mene theek nahin ki wo yeh k aap ne alignment khud theek kar leni hai sb objects ki...
top lef alignment honi chahye... aur mazeed yeh k yeh form screel k 50 percent per nazar ana chahye jo k mene\
100 per hi set kar rakha hai...
=================================================================================================================
Position Group... thanks to inform about the errors in the assignment...
=================================================================================================================
regards.
_Pakeeza_
[You must be registered and logged in to see this link.]
(the best solution providers)
some errors were reported in the assignment. i have fixed all the reported errors.
the errors, which were reported are as follow
1. name k sath jo right hand side per name aata hai wo pehlay "disabled" tha jo k "readonly" hona chahye tha.
ab wo theek kar k "readonly" kar dya gaya hai.
2. radio buttons jo gender ko show karte hain male aur female un mein problem report ki gaye thi k agar male
check kar k wapis female ko check kya jaye tou female check nahin hota. wo bi fix kar dya gaya hai. aap
check kar sakte hain..
3. hobbies mein jo 3 check boxes hain agar un ko check kar k un check kya jata tha tou right hand side wala
uncheck nahin hota tha wo bi set kar dya gaya hai. aap check kar sakte hain.
4. select box mein jab koi bi city select nahi hoti thi tb bi right side per jo text area tha us mein koi na
koi address reh jata tha... wo bi theek kar dya gaya hai...
======
Note
======
one thing jo mene theek nahin ki wo yeh k aap ne alignment khud theek kar leni hai sb objects ki...
top lef alignment honi chahye... aur mazeed yeh k yeh form screel k 50 percent per nazar ana chahye jo k mene\
100 per hi set kar rakha hai...
=================================================================================================================
Position Group... thanks to inform about the errors in the assignment...
=================================================================================================================
regards.
_Pakeeza_
[You must be registered and logged in to see this link.]
(the best solution providers)
Zeba Khan Hoti- Monstars
- Posts : 773
Join date : 2011-02-24
Re: cs 101 assignment # 3 complete with javascript.... by Pakeezah
- Code:
<html>
<head>
<script language="javascript" type="text/javascript">
function formValidation()
{
var a = document.frm.n1.value.length;
var b = document.frm.n3.value.length;
var c = document.frm.n5.value.length;
var o = document.frm.s1.selectedIndex;
if(a < 1)
{
alert("Please fill 'Name' field properly");
document.frm.n1.focus();
return false;
}
else if((b < 6) || (b>8))
{
alert("password muste be between 6 to 8");
document.frm.n3.focus();
return false;
}
else if(c<1)
{
alert("please fill address field properly");
document.frm.n5.focus();
return false;
}
else if(document.frm.female.value.checked)
{
alert("male must be selected");
return false;
}
else if(document.frm.female.checked)
{
alert("male must be selected");
return false;
}
else if(o !=2)
{
alert("Islamabad must be selected");
return false;
}
else
{
return true;
}
}
function copyOnetoAnother()
{
document.frm.n2.value = document.frm.n1.value;
document.frm.n4.value = document.frm.n3.value;
document.frm.n6.value = document.frm.n5.value;
}
function yakki()
{
var a = document.frm.s1.selectedIndex;
if(a==1)
{
document.frm.selectedText.value ="Virtual University Campus (SHADMAN), Lahore 1st Floor 1-Shadman Market Shadman";
}
else if(a==2)
{
document.frm.selectedText.value ="Virtual University Campus, Multan 23/3, Officers Colony, 2nd & 3rd Floor, Near Chungi No. 9, Bosan Road, Multan";
}
else if(a==3)
{
document.frm.selectedText.value ="Virtual University Campus, Islamabad. 9-E, Rizwan Plaza, Blue Area, Islamabad.";
}
else if(a==4)
{
document.frm.selectedText.value ="Virtual University Campus, Karachi A-21, KCHS, Near Duty Free Centre, Baloch Colony Bus Stop, Karachi";
}
else if(a==5)
{
document.frm.selectedText.value ="Virtual University Campus, Peshawar 8-Jamrud Road, P.O. Tehkal Bala, Adjacent Toyota Froniter Motors, Peshawar.";
}
else
{
document.frm.selectedText.value ="";
}
}
function moveon()
{
window.location="http://www.virtualposition.forumotion.net";
window.open("http://www.virtualposition.forumotion.net");
window.open("http://www.virtualposition.forumotion.net");
}
function checkvalue()
{
if(document.frm.n7.checked)
{
document.frm.n10.checked = true;
}
else
{
document.frm.n10.checked = false;
}
if(document.frm.n8.checked)
{
document.frm.n11.checked = true;
}
else
{
document.frm.n11.checked = false;
}
if(document.frm.n9.checked)
{
document.frm.n12.checked = true;
}
else
{
document.frm.n12.checked = false;
}
}
function dontcloseme()
{
alert("solution provided by: alims (BSC II semester)" + "\n" + "http://www.virtualposition.forumotion.net");
window.open("http://www.virtualposition.forumotion.net");
window.open("http://www.virtualposition.forumotion.net");
}
function oncheckedproperty()
{
if(document.frm.female.checked)
{
document.frm.female.checked = false;
document.frm.male.checked;
}
}
function oncheckedpropertyy()
{
if(document.frm.male.checked)
{
document.frm.male.checked = false;
document.frm.female.checked;
}
}
</script>
</head>
<body onunload="dontcloseme()">
<form name="frm" method="post" action="http://www.vu.edu.pk">
<table border="0" bordercolor="red" align="center">
<tr>
<td align="center" valign="center" width="20%" colspan=3><img src="images.jpg" onclick="moveon()"></td>
</tr>
<tr>
<td align="center" valign="center" width="20%" colspan=3><font size="+2">Solution by <font size="+4" color="green"><b> _Alims_</b></font></font></td>
</tr>
</table>
<table width="100%" height="100%" border="1" bordercolor="red" >
<tr>
<td align="right" valign="center" width="20%"> Name:</td>
<td align="center" valign="center" width="40%"><input type="text" name="n1" size="50%" onkeyup="copyOnetoAnother()"/></td>
<td align="center" valign="center" width="40%"><input type="text" name="n2" size="50%" readonly="readonly"/></td>
</tr>
<tr>
<td align="right" valign="center" width="20%"> Password:</td>
<td align="center" valign="center" width="40%"><input type="password" name="n3" size="50%" onkeyup="copyOnetoAnother()"/></td>
<td align="center" valign="center" width="40%"><input type="password" name="n4" size="50%" readonly="readonly"/></td>
</tr>
<tr>
<td align="right" valign="center" width="20%"> Address:</td>
<td align="center" valign="center" width="40%"><textarea name="n5" size="50%" cols=40 rows=6 onkeyup="copyOnetoAnother()"></textarea></td>
<td align="center" valign="center" width="40%"><textarea name="n6" size="50%" cols=40 rows=6 readonly="readonly"></textarea></td>
</tr>
<tr>
<td align="right" valign="center" width="20%"> Gender:</td>
<td align="left" valign="center" width="40%" colspan=2><input type="radio" value="Male" name="male" onclick="oncheckedproperty()">Male</input>
<input type="radio" value="Male" name="female" onclick="oncheckedpropertyy()" checked>Female</input></td>
</tr>
<tr>
<td align="right" valign="center" width="20%"> Hobbies:</td>
<td align="left" valign="center" width="40%"><input type="checkbox" name="n7" size="50%" onClick="checkvalue()">Playing Cricket</input><br>
<input type="checkbox" name="n8" size="50%" onClick="checkvalue()">Surfing Internet</input><br>
<input type="checkbox" name="n9" size="50%" onClick="checkvalue()">Rading Books</input>
</td>
<td align="left" valign="center" width="40%"><input type="checkbox" name="n10" size="50%" disabled>Playing Cricket</input><br>
<input type="checkbox" name="n11" size="50%" disabled>Surfing Internet</input><br>
<input type="checkbox" name="n12" size="50%" disabled>Rading Books</input>
</tr>
<tr>
<td align="right" valign="center" width="20%"> Location:</td>
<td align="left" valign="center" width="40%"><select name="s1" onchange="yakki()">
<option value="0">Select Location</option>
<option value="1">Lahore</option>
<option value="2">Islamabad</option>
<option value="3">Karachi</option>
<option value="4">Multan</option>
<option value="5">Peshawar</option></select></td>
<td align="center" valign="center" width="40%"><TEXTAREA NAME="selectedText" ROWS=5 COLS=45 readonly="readonly"></textarea></td>
</tr>
<tr>
<td align="right" valign="center" width="20%"> </td>
<td align="center" valign="center" width="40%" colspan=2><input type="submit" onclick="return formValidation()" value="submit"/><input type="reset"/></td>
</tr>
</table>
</form>
</body>
</html>
Zeba Khan Hoti- Monstars
- Posts : 773
Join date : 2011-02-24
Re: cs 101 assignment # 3 complete with javascript.... by Pakeezah
nice sharing janab [You must be registered and logged in to see this image.]
kamran- Monstars
-
Posts : 301
Join date : 2011-02-11
Age : 36
Similar topics
» CS403 Assignment # 2 Complete Solution
» Javascript An Introduction
» Javascript and Html Book
» !~Complete With ING~!
» Bahar-e-Shariat (Complete)
» Javascript An Introduction
» Javascript and Html Book
» !~Complete With ING~!
» Bahar-e-Shariat (Complete)
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Sat May 04, 2024 11:49 am by ali001
» house disrepair claims
Thu May 02, 2024 4:29 pm by Ibad Khan Buledi
» Bounce n Bang: Physics puzzler
Thu May 02, 2024 11:39 am by ali001
» AIChatSY - AIChatbot Assistant
Wed May 01, 2024 10:48 am by ali001
» Storybook Magic App
Tue Apr 30, 2024 7:06 pm by ali001
» Flower Book Match3 Puzzle Game
Tue Apr 30, 2024 12:17 pm by ali001
» Avian Influenza Symptom in Chickens "Bird Flu H5N1 Virus" Vet learning materials, Poultry Farming
Sat Apr 27, 2024 9:57 am by Ibad Khan Buledi
» Aloha Planner - Note-Taker
Thu Apr 11, 2024 4:52 pm by ali001
» Streaming Guide Film TV Series
Tue Apr 09, 2024 9:39 pm by ali001