Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
guruakashsm authored Nov 14, 2023
1 parent 6883e44 commit 65d10b1
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions projects/flames/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,32 +96,31 @@

<body>
<h1>FLAMES</h1>
<form id="flamesForm" >
<form id="flamesForm">
<label for="name1">Name 1: </label>
<input type="text" id="name" required placeholder=" e.g: Guruakash">
<input type="text" id="name1" required placeholder=" e.g: Guruakash">

<label for="name2">Name 2: </label>
<input type="text" id="name2" required placeholder=" e.g: Anu">
<br>
<button type="submit" id="calculateButton" onclick="calculateFLAMES()">Calculate</button>
<input type="button" id="calculateButton" value="Calculate" onclick="calculateFLAMES()">
</form>

<div id="result">
<p id="relationship">Relationship</p>
</div>
<br>
<br>
<centre style = "colour:pink;">© Copyright 2023. Made by Guruakash SM</centre>

<script>
function calculateFLAMES() {
let name1 = document.getElementById("name").value.toLowerCase();
let name1 = document.getElementById("name1").value.toLowerCase();
let name2 = document.getElementById("name2").value.toLowerCase();


if (name1.trim() === "" || name2.trim() === "") {
alert("Please provide both names before calculating.");
return;
}

let flames = "DFLAMES";
let k = 1;
let counter = 0;
Expand Down

0 comments on commit 65d10b1

Please sign in to comment.