Categories
JavaScript

Feet To Inches Converter Vice Versa in JavaScript

A simple program that I wrote using JavaScript programming language to ask value in feet or inches and it will convert it into feet or inches equivalent.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.


Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.
My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com


I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/

Sample Program Output

Sample Program Output
<hmtl>
<head>
  <title>Feet To Inches Converter  Vice Versa in JavaScript</title>
 </head>
 <style>
   body {
    font-family:arial;
    size:12px;
  }
 </style>
<body onload="init()">
  <p>Feet To Inches Converter Vice Versa in JavaScript</p>
  <table cellspacing="6">
    <tr valign="top">
      <td><input id="feet" size="20" onfocus="reset()" /><br />Feet</td>
      <td><input type="button" value="Ok" onclick="convert()" title="Click here to convert" /></td>
      <td><input id="inches" size="20" onfocus="reset()" /><br />Inches</td>
      <td><input type="button" value="Clear All" onclick="reset()" title="Click here to clear the text box." /></td>
    </tr>
  </table>
  <script>
  
  var feet, inches;

function init(){
  feet = document.getElementById('feet');
  inches = document.getElementById('inches');
}

function reset(){
  feet.value = "";
  inches.value = "";
}

function convert(){
  var f = feet.value.replace(/ /, "");
  if (f){
    inches.value = f * 12;
  }
  
  var i = inches.value.replace(/ /, "");
  if (i){
    feet.value = i / 12;
  }
}

</script>
</body>
</html>
Categories
JavaScript

Inches To Centimeter Converter in JavaScript

I wrote this program to accept values in inches and then convert it into centimeter values using JavaScript programming language.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.


Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com
I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/

Sample Program Output
<hmtl>
<head>
  <title>Inches To Centimeter Converter in JavaScript</title>
 </head>
 <style>
   body {
    font-family:arial;
    size:12px;
  }
 </style>
<body onload="init()">
  <p>Inches To Centimeter Converter in JavaScript</p>
  <table cellspacing="6">
    <tr valign="top">
      <td><input id="inch" size="20" onfocus="reset()" /><br />Inches</td>
      <td><input type="button" value="Ok" onclick="convert()" title="Click here to convert" /></td>
      <td><input id="cm" size="20" onfocus="reset()" /><br />Centimeter</td>
      <td><input type="button" value="Clear All" onclick="reset()" title="Click here to clear the text box." /></td>
    </tr>
  </table>
  <script>
  
  var inf, cmf;

function init(){
  inf = document.getElementById('inch');
  cmf = document.getElementById('cm');
}

function reset(){
  inf.value = "";
  cmf.value = "";
}

function convert(){
  var i = inf.value.replace(/ /, "");
  if (i){
    cmf.value = i * 2.54;
  }
  
  var c = cmf.value.replace(/ /, "");
  if (c){
    inf.value = c / 2.54;
  }
}

</script>
</body>
</html>
Categories
JavaScript

Do-While Loop Using JavaScript

I wrote this program to ask the user to give a number and then it will display the series of numbers using the do-while loop statement in JavaScript programming language.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.


Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.


My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com


I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

Sample Program Output
Sample Program Output
<html>
 <head>
   <title>Do-While Loop Using JavaScript</title>
</head>   
<style>
    body {
        font-family: Arial, Helvetica, sans-serif;
        size:15px;
    }
</style>
<body>

    <h2>Do-While Loop Using JavaScript</h2>
    <p> Written By Jake R. Pomperada</p>
    
   Give a Number &nbsp;&nbsp;<input id="num_val" value="" />


     <br><br>
    <button onclick="Check()">Ok</button>
    <br>
    <p id="demo"></p>
    
    <script>
        // March 22, 2020    3:08 PM
        // Bacolod City, Negros Occidental
    function Check() {
      var num_val, result="";
      var i = 1;
      num_val = Number(document.getElementById("num_val").value);
       
       do 
       {
          result += "<br>The number is " + i +".";
          i++;
       } while (i <= num_val);

      document.getElementById("demo").innerHTML = result;
    }
    </script>
</body>
</html>
Categories
JavaScript

While Loop Using JavaScript

I wrote this program to ask the user to give a number and then it will display the series of numbers using while loop statement in JavaScript programming language.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.
Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com


I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

Sample Program Output
Sample Program Output
<html>
 <head>
   <title>While Loop Using JavaScript</title>
</head>   
<style>
    body {
        font-family: Arial, Helvetica, sans-serif;
        size:15px;
    }
</style>
<body>

    <h2>While Loop Using JavaScript</h2>
    <p> Written By Jake R. Pomperada</p>
    
   Give a Number &nbsp;&nbsp;<input id="num_val" value="" />


     <br><br>
    <button onclick="Check()">Ok</button>
    <br>
    <p id="demo"></p>
    
    <script>
        // March 22, 2020    2:30 PM
        // Bacolod City, Negros Occidental
    function Check() {
      var num_val, result="";
      var i = 1;
      num_val = Number(document.getElementById("num_val").value);
       
      while (i <= num_val) {
          result += "<br>The number is " + i +".";
          i++;
       }

      document.getElementById("demo").innerHTML = result;
    }
    </script>
</body>
</html>
Categories
JavaScript

Positive and Negative Number Using JavaScript Ternary Operator

I wrote this program that will ask the user to give a number and then the program will check and determine if the given number by the user is a positive or negative number using JavaScript ternary operator as my programming language.
I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.


My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.


My mobile number here in the Philippines is 09173084360.My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.


Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.


My personal website is http://www.jakerpomperada.comMy programming website is http://www.jakerpomperada.blogspot.com


I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

Screenshot if the given number is positive.
Screenshot of the given number is negative.
<html>
 <head>
   <title>Positive and Negative Number Using JavaScript Ternary Operator</title>
</head>   
<style>
    body {
        font-family: Arial, Helvetica, sans-serif;
        size:15px;
    }
</style>
<body>

    <h2>Positive and Negative Number Using JavaScript Ternary Operator</h2>
    <p> Written By Jake R. Pomperada</p>
    
   Give a Number &nbsp;&nbsp;<input id="num_val" value="" />


     <br><br>
    <button onclick="Check()">Ok</button>
    <br>
    <p id="demo"></p>
    
    <script>
    function Check() {
      var num_val, result;
      num_val = Number(document.getElementById("num_val").value);
      if (isNaN(num_val)) {
        result = "The given value is not a number. Try Again.";
      } else {
        result = (num_val < 0) ? "The given number is Negative." : "The given number is Positive.";
      }
      document.getElementById("demo").innerHTML = result;
    }
    </script>
</body>
</html>
Categories
JavaScript

Qualified To Vote Using JavaScript Ternary Operator

I wrote this simple program using JavaScript to ask the user to give a age of the user the program will determine if the user qualified to vote or not in the next election. Assume that the voting age to qualify to vote is 18 years old and above.
I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.


My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.


My mobile number here in the Philippines is 09173084360.My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.


Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.


My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

Sample screenshot if the given age of the user is below 18 years old.
Sample screenshot if the given age of the user is 18 years old and above.
<html>
 <head>
   <title>Qualified To Vote Using JavaScript Ternary Operator</title>
</head>   
<style>
    body {
        font-family: Arial, Helvetica, sans-serif;
        size:15px;
    }
</style>
<body>

    <h2>Qualified To Vote Using JavaScript Ternary Operator</h2>
    <p> Written By Jake R. Pomperada</p>
    
    What is your age? &nbsp;&nbsp;<input id="age" value="" />


     <br><br>
    <button onclick="Check()">Ok</button>
    <br>
    <p id="demo"></p>
    
    <script>
    function Check() {
      var age, voteable;
      age = Number(document.getElementById("age").value);
      if (isNaN(age)) {
        voteable = "Age input is not a number. Try Again.";
      } else {
        voteable = (age < 18) ? "You are not allow to vote still young." : "You are qualified to vote.";
      }
      document.getElementById("demo").innerHTML = voteable;
    }
    </script>
</body>
</html>
Categories
JavaScript

Switch Statement in JavaScript

A simple program that I wrote using the JavaScript programming language to show how to use the switch statement.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.


My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.


Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.


My personal website is http://www.jakerpomperada.comMy programming website is http://www.jakerpomperada.blogspot.com


I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

Sample Program Output

Program Listing

index.htm


<html>
 <head>
  <title>Switch Statement in JavaScript </title>
 </head>
 <body>
  <script type="text/javascript">
a=1;
document.write("The given year level is " +a);


switch (a) {
  case 1:
     alert("You are belong first year");
     break;
  case 2:
     alert("You are belong second year");
     break;
  case 3:
     alert("You are belong third year");
     break;
  case 2:
     alert("You are belong fourth year");
     break;
     
  default:
     alert("Invalid Year Level. Try Again");
}
</script>
 </body>
 </html>
Categories
JavaScript

Kilogram To Ounce Converter in JavaScript

I wrote this program to ask the user to give kilogram value and then it will convert into ounce weight equivalent using JavaScript programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.


My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.
Here in Bacolod City, Negros Occidental I also accepting computer repair, networking and Arduino Project development at a very affordable price.


My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/https://www.unlimitedbooksph.com/

Sample Program Output

Sample Program Output

Program Listing

index.html

<html>
  <head>
   <title>Kilogram To Ounce Converter in JavaScript</title>
  </head>
  <body>
  	 <style>
      body {
       font-family: arial;
       font-size: 20px;
       font-weight: bold;
      }
   </style>
<script type="text/javascript">
   function forward() {
      with (document.convert) {
	 unit1.value = unit1.value.toString().replace(/[^\d\.eE-]/g,'');
	 if (unit1.value/0.0252 != 0) {
	    unit2.value = (unit1.value/0.0252).toFixed(2);
	 }
      }
   }
   function backward() {
      with (document.convert) {
	 unit2.value = unit2.value.toString().replace(/[^\d\.eE-]/g,'');
	 if (unit2.value*0.0252 != 0) {
	    unit1.value = (unit2.value*0.0252).toFixed(2);
	 }
      }
   }
</script>

<h4></h4>
<noscript><p><font color="red"><strong>Please enable Javascript
to use the unit converter</strong></font></p></noscript>
<form name="convert" style="font-size:1.3em;border:solid 1px #B7D7AF;border-radius:7px;background-color:#EEEEEE;margin-right:10px;padding-left:10px;padding-right:10px">
<br />
<tr>
<td><strong>Kilogram To Ounce Converter in JavaScript</strong></td></tr>
<table border="0" cellpadding="7" cellspacing="0">

<tr>
	<td><input type="number" step="0.1" name="unit1" style="width:200px;font-size:1em" onchange="forward()" value=""></td><td><strong>Kilogram</strong></td></tr>
<tr><td><input type="number" step="0.1" name="unit2" style="width:200px;font-size:1em" onchange="backward()" value=""></td><td><strong>Ounce</strong></td></tr>
<tr><td><input type=button value="Convert" style="font-size:1em;margin-bottom:15px" onclick="forward()"></td></tr></table>
</form>
</body>
</html>
Categories
JavaScript

Product of Two Numbers in JavaScript

I wrote this program using JavaScript to ask the user to give two numbers and then the program will compute the product of two numbers and display the results using an alert dialog box in JavaScript.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.


My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.


Here in Bacolod City, Negros Occidental I also accepting computer repair, networking and Arduino Project development at a very affordable price.


My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/

Sample Program Output
Sample Program Output

Program Listing

index.html

<html>
  <head>
   <title>Product of Two Numbers in JavaScript</title>
  </head>
  <style>
      body {
       font-family: arial;
       font-size: 20px;
       font-weight: bold;
      }
   </style>
  <body>
  	
<script>
function product(){
var num1=document.form.text1.value;
var num2=document.form.text2.value;
var sum=Number(num1)*Number(num2);
alert("The product between " + num1 + " and " + num2 + " is " + sum + ".");
}
</script>
<form name="form"><br>
	<h4>Product of Two Numbers in JavaScript</h4>
<table>
<tr>
<td>Enter First Number:</td>
<td><input type="text" name="text1"></td>
</tr>
<tr>
<td>Enter Second Number:</td>
<td><input type="text" name="text2"></td>
</tr>
<tr>
<tr></tr><tr></tr>
<td><input type="button" value="Solve For Product" onclick="product();"></td>
</tr>
</table>
</body>
</html>