0% found this document useful (0 votes)
69 views4 pages

Code For Mini Project: Rishikesh

The document contains code for a mini ecommerce project with sections for selecting a payment method and product quantity. There is JavaScript to validate the required payment method selection. Styling is applied using CSS. The page displays product information and uses forms, tables, and dropdown menus for payment selection and quantity choice.

Uploaded by

RishikeshMalviya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views4 pages

Code For Mini Project: Rishikesh

The document contains code for a mini ecommerce project with sections for selecting a payment method and product quantity. There is JavaScript to validate the required payment method selection. Styling is applied using CSS. The page displays product information and uses forms, tables, and dropdown menus for payment selection and quantity choice.

Uploaded by

RishikeshMalviya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Code for Mini Project

<!DOCTYPE html>
<html>
<head>
<title>Mini Project Related To Ecommerce</title>
<style>
h1{
background-color:red;
}
p{
background-color:pink;
}
</style>
<script type="text/javascript">
function getValidation()
{
var r = document.getElementsByName("c");
var c = -1;

for(var i=0; i < r.length; i++){


if(r[i].checked) {
c = i;
}
}
if (c == -1) alert("please select Payment Method");
Rishikesh

Page 61

else
{ alert("Successful!!!!!!!you will be redirected to next page");}
}
</script>
</head>
<body bgcolor="blue">
<p color="green">Cadbury DAIRY MILK</p>
<img src="Cadbury_5_MR.jpg" alt="Test Image" />
<table align="right" >
<tr>
<td><input type ="radio" name="c" id="chk"></td>
<td>Debit Card</td>
</tr>

<tr>
<td><input type ="radio" name="c" id="chk"></td>
<td>Credit Card</td>
</tr>

<tr>
<td><input type ="radio" name="c" id="chk"></td>
<td>W-Wallet</td>
</tr>

<tr>
Rishikesh

Page 62

<td><input type ="radio" name="c" id="chk"></td>


<td>Cash on delivery</td>
</tr>
<tr>
<td colspan="2">
<input type="Submit" value="Proceed" onclick="getValidation()">
</td>
</tr>
</table>
<form>
<input type="button" name="ok" value="ADD TO CART" width="20" />
<center>
<h1>Quantities to be selected</h1>
<select name="dropdown">
<option value="Not Selected" selected>Not Selected</option>
<option value="1" selected>1</option>
<option value="2">2</option>
<option value="3" selected>3</option>
<option value="4">4</option>
<option value="5" selected>5</option>
<option value="6">6</option>
<option value="7" selected>7</option>
<option value="8">8</option>
<option value="9" selected>9</option>
<option value="10">10</option>
Rishikesh

Page 63

</select>
</center>
</form>
</body>
</html>

Rishikesh

Page 64

You might also like