Posts

Showing posts from 2024
  <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0" >     < title >Product Filter</ title >     < link rel = "stylesheet" href = "https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" >     < style >         #slider-range {             margin: 20 px ;         }         .price {             font-size: 16 px ;             font-weight: bold ;         }         .product-grid {             display: flex ;             flex-wrap: wrap ;             gap: 15 px ;         ...
 <?php function numberToWords($num) {     $ones = array(         0 => "zero",         1 => "one",         2 => "two",         3 => "three",         4 => "four",         5 => "five",         6 => "six",         7 => "seven",         8 => "eight",         9 => "nine",         10 => "ten",         11 => "eleven",         12 => "twelve",         13 => "thirteen",         14 => "fourteen",         15 => "fifteen",         16 => "sixteen",         17 => "seventeen",         18 => "eighteen",         19 => "nineteen"   ...

Select one checkbox at a time from group of checkbox

Select one checkbox at a time from group of checkbox <div class="btn-group" role="group" onclick="selectOne(event)">   <input type="checkbox" class="btn-check" id="btncheck1" value='1' autocomplete="off">   <label class="btn btn-outline-primary" for="btncheck1">Checkbox 1</label>   <input type="checkbox" class="btn-check" id="btncheck2" value='2' autocomplete="off">   <label class="btn btn-outline-primary" for="btncheck2">Checkbox 2</label>   <input type="checkbox" class="btn-check" id="btncheck3" value='2' autocomplete="off">   <label class="btn btn-outline-primary" for="btncheck3">Checkbox 3</label> </div> <script> function selectOne(event) {     const clickedElement = event.target; ...

Form Validation

Form Validation <!DOCTYPE html> <html> <head>     <title>Form Validation</title>      </head> <body>     <form id="loginForm">         <input type="text" name="username" required placeholder="Username" data-error-msg="Username is required"><br><br>         <input type="password" name="password" required placeholder="Password" data-error-msg="Password is required"><br><br>         <input type='text' class='form-control' data-error-msg="Data required" required>         <!-- Additional form fields -->         <button type="button" id="submitForm">Submit</button>     </form>     <div id="result"></div> </body> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>     <sc...