














































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!















































O;nod: 17.09.
Z,^1 C^JCNtt-.?a-r^ J' c^Jl./tqg),1c.t9.<-^ ?^Jc^^r9-(,^ -.r^9 ^)\ --r.C!lrl^J. -o(0)o-
aioA.rit- o*e- r!
rieodo3:o$ ezfodd. acJo.Qril9 ildrddd 6Je-r: ae4 m,odcme;d:dAd ir.oasienni.
ioas; Gr.3.a/06/a€fsdatu/2018-1e
'ale"J (^) U/ :
d"oE d.m6-on \ (^) ;L.^?... (^) ---a-.<--j=o'c,i-/)vcJFoJcJ- cJq)o/\od CEeJ'd".::x{ ert. {"+feJil"dUeJ"cJ?^ raf,:rc1 iiriy.-,JrqJOeJ^^iQr"',,J i.."N,99 l. Web Programming Lab Manual
For 5 th Sem CS (2017-2018)
BY
Mrs. SAVITHA KAMALAPURKAR LECTURER
Computer Science Department S J (Govt) Polytechnic Bangalore
Email: [email protected]
Save file as .html file. And open file in browser.
OUTPUT
My apartment name is Golden Grands
It is located at Yeshwanthpur NH4 road, Bangalore - 23.
and it has 3 bedrooms, 1 living room, 1 kitchen 1 club house with a beautiful garden
Program 2
The document must contain four short paragraphs of text stacked on top of
each other with only enough of each showing so that the mouse cursor can also
be placed over some part of them. When the cursor is placed over the exposed
part of any paragraph it should raise to the top to become completely visible.
Dynamic stacking of paragraphs
Iam sarala, Iam a computer science student. Reg no 102CS12017 Iam coming from Bommanahalli.
Iam Kavya, Iam a computer science student. Reg no 102CS12019 Iam coming from chamrajpet.
Iam Arpitha, Iam a computer science student. Reg no 102CS12003 Iam comin from Deepanjalinagar.
Iam Yamuna, Iam a computer science student. Reg no 102CS12016 Iam coming from Tinfactory.
Program 3
Design an XML document to store information about patients in a hospital.
Information about patients must include name (in 3 parts, first name, middle
name, last name), social security number (SSN), age, room number, primary
insurance company – including member identification number, group number
and address – secondary insurance company (in the same sub parts as for the
primary insurance company), known medical problems, and known drug
allergies. Both attributes and nested tags must be included. Make up sample
data of atleast 4 patients. Create a CSS style sheet for the above XML
document and use it to create a display of that document.
XML File
sanjay s Srinivas
100 80 420
10 Yeshwanthpura
20 jayanagar
Bp None
rakshith gm gowda
101
41 421
111 jp nagar
112 vijayanagar
vitamin deficiency Cold
rudresh g gowda
102 42 422
113 mathikere
114 jp
cancer Swelling
kumar v gowda
103 41 423
113
font-family:chiller; font-size:24px; } id { display:block; color:black; margin-left:10%; font-family:gigi; font-size:20px; } gn { display:block; color:voilet; margin-left:10%; font-family:arial; font-size:14px; } address { color:brown; font-family:script; font-weight:italic; font-size:30px; margin-left:5%; } medproblems { display:block; color:orange; font-family:script; font-weight:italic; font-size:30px; margin-left:5% } drugallergy { display:block; color:gray; font-family:script; font-weight:bold; font-size:30px; margin-left:5% }
Save above file as p3.css. Save both .xml and .css files in same directory. And open xml file in browser to view output
OUTPUT
vitamin deficiency Cold
rudresh g gowda
102 42 422
113 mathikere
114 jp
cancer Swelling
kumar v gowda
103 41 423
113 malleshwaram.
115 j.p.v nagar
coma None
Save above file as .xml (eg:p4.xml)
p4.xsl
Patient Information
SSN Name Age Room Primary insurance Company secondary insurance Company Medical problem Drug Allery
Save file as p4.xsl file
Open xml file in browser to view the below output
countvisitors.php
"; for ($x = 1; $x < $count[1]; $x++) { echo " $x "; } print "You are visitor number = ".$count[1]; ?>
Running the program
Open html file in browser to see below links.On click of links random greeting
and no of visitors visited the site can be seen.
Four 100watt long life bulbs for Rs. 30.95
Eight 100watt long life bulbs for Rs 70.49
VISA MASTER CARD DISCOVER
Save above file as .html file in any folder. Also download and save json2.js file in the same folder location.
p6.php
Display Form
php $name=$_POST["mname"]; $mode=$_POST["paymode"]; $item1=0; $item2=0; $item3=0; $item4=0; $price1=20.39; $price2=30.95; $price3=40.20;
$price4=70.49; if(isset($_POST['option1'])) $item1=$_POST['VAL1']; if(isset($_POST['option2'])) $item2=$_POST['VAL2']; if(isset($_POST['option3'])) $item3=$_POST['VAL3']; if(isset($_POST['option4'])) $item4=$_POST['VAL4'];
$total1=$item1$price1; $total2=$item2$price2; $total3=$item3$price3; $total4=$item4$price4;
$total=$total1+$total2+$total3+$total4; $total+=($total*13.5)/100;
print(" User Name:$name"); ?> You have ordered following items
ItemQtyPriceTotal Four 100 watt bulbs for Rs. 20.39
Eight 100watt bulbs for Rs 40.20
Four 100watt long life bulbs for Rs. 30.95
Eight 100watt long life bulbs for Rs 70.49
$total ");?> $mode ");?>
Save above file as p6.php and store in htdocs folder of the xampp(eg: C:\xampp\htdocs). Start apache. Open html file in browser to order the items. On submit of the form one can view ordered items and total bill generated including 13.5% tax.