Friday, April 13, 2018

Check Email Format in JavaScript

Here is a simple script that I wrote using JavaScript to check if the given email format by our user is valid or not.

I am currently accepting programming work, it project, school programming projects , thesis and capstone projects, IT consulting work and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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.



Program Listing

email.htm


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Check Email Format</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript">
function checkemail( ){
if(document.myForm.email.value.length!=0){
if(document.myForm.email.value.charAt(0)=="."||
   document.myForm.email.value.charAt(0)=="@"||
   document.myForm.email.value.indexOf('@',0)==-1||
  document.myForm.email.value.indexOf('.',0)==-1||
          document.myForm.email.value.lastIndexOf('@')==document.myForm.email.value.length-1||
        document.myForm.email.value.lastIndexOf('.')==document.myForm.email.value.length-1 ) {
alert("E-mail format wrong!");
document.myForm.email.focus();
return false;
}
else {
alert("Email Format Correct!");}
}
else{
alert("Email cannot be empty!");
document.myForm.email.focus();
return false;
}
return false;
}
</script>
</head>
<body>
<center>
  <h2>Check E-mail Format </h2>
  <hr>
</center>
<form name="myForm" method="POST" action onSubmit="return checkemail()">
  <div align="center">E-mail: 
    <input type="text" name="email" id="email" size="20">
    &nbsp;
    <input type="submit" value="Submit" >
  </div>
</form>
</body>
</html>


Filter Bad Words in JavaScript

Here is a sample script to filter bad words from a sentence given by our user using JavaScript

I am currently accepting programming work, it project, school programming projects , thesis and capstone projects, IT consulting work and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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.



Program Listing

filter.htm

<html>
<head>
<title>Filter Bad Words in JavaScript</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script language="javascript">
message=prompt("Filter “fool, idiot, imbecile and moron” words. Please enter your message: ","");
subsitude = /fool|idiot|imbecile|moron|fuck/g;
if (message.match(subsitude)){
message=message.replace(subsitude,"master");
message=message.bold().fontcolor("#FF0000");
myText="Your message has a ungraceful word, which has been replaced by: " + message;
}
else{
message=message.bold().fontcolor("#0000FF");
myText="Yor message has no ungraceful word, you said:  " + message;
}
</script>
</head>
<body>
<script language="javascript">
document.write(myText)
</script>
<br>
</body>
</html>



Check for Digit Number in JavaScript

A very simple script that I wrote using JavaScript to check if the given value of the user is number or not.

I am currently accepting programming work, it project, school programming projects , thesis and capstone projects, IT consulting work and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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.


Program Listing

num.htm

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Check for Digit Number in JavaScript</title>
<script language="JavaScript">
<script language="javascript">
function checkDigitals()
{
if(isNaN(myForm.num.value)){
  alert("Please enter a digital number!");
  myForm.num.focus();
  myForm.num.value=""
  return (false);
}
else
{
alert("Input correct!");
}
}
</script>
<body>
<br>
<h4> 
<div align="center">Check Digital Input
</div></h4>
<form name=myForm>
  <div align="center">
    <input type=text name=num size=25>
    <input type=button onClick="checkDigitals()" value= "Check Digitals">
  </div>
</form>
</body>
</html>


Check Input in JavaScript

Here is a sample script written in JavaScript to check if the form input is valid or not and not empty.

I am currently accepting programming work, it project, school programming projects , thesis and capstone projects, IT consulting work and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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.


Program Listing

check.htm


<html> 
<head> 
<title>Check Empty Input</title> 
<script language="JavaScript"> 
function checkEmpty(myForm) 
if (myForm.phone.value == "")      
alert("Please enter phone number!");
myForm.email.focus();
return (false); 
if (myForm.email.value == "") 
alert("Please enter email address!"); 
myForm.message.focus(); 
return (false); 
if (myForm.message.value == "") 
alert("Please leave a message!"); 
myForm.phone.focus(); 
return (false); 
}
</script>
</head> 
<body> 
<br>
<center>
  <p><strong>Check Empty Input</strong></p>
  <br>
</center> 
<form name="myForm" method="post" onSubmit="javascript:return checkEmpty(this);"> 
<table width="36" border="0" cellspacing="1" cellpadding="1" align="center"> 
<tr> 
<td>Phone:
  <input type=text name=phone size=30> 
</td> 
</tr> 
<tr> 
<td>Email:
  <input type="text" name=email size="30"> 
</td> 
</tr> 
<tr> 
<td>Message:<br>
  <textarea name=message  cols=37 rows=6></textarea> 
</td> 
</tr> 
<tr> 
<td>
<div align="right">
  <input type="submit" name="pub" value="Check Empty">
</div>
</td> 
</tr> 
</table> 
</form> 
</body> 
</html>


Three Times Password in JavaScript

Here is a simple script to allow the user to give username and password at least three times. The code is very simple and easy to understand.

I am currently accepting programming work, it project, school programming projects , thesis and capstone projects, IT consulting work and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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.



Program Listing

pass.htm

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Three Times Password in JavaScript</title>
<script language="JavaScript">
numberTimes=0
function checkpassword(){
if (numberTimes== 3){
alert("You have entered wrong password for three times, you must not use this system anymore!")
window.close();
}
else{
if((document.myForm.username.value == "123")&&(document.myForm.myPassword.value == "123"))
{
alert("Password Correct!")
window.location="http://www.jakerpomperada.blogspotcom";
            }
else{
numberTimes=numberTimes+1
alert("Wrong password, please try again!")
return false
}
}
}
</script>
</head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<body>
<h2> Three Times Password in JavaScript </h2>
<br>
<form name="myForm" method="post">
  <div align="center"><p>&nbsp;</p><br>
Username:
<input name="username" type="text"><br>
Password:
<input name="myPassword" type="password"><br>
<input type="button" name="submit" value="Submit" onClick="checkpassword();">
  </p>
<br>
    <p>If you enter wrong password for three times, </p>
    <p>you will be not allowed to use this system anymore! </p>
  </div>
</form>
</body>

</html>

Disable Right-Click menu in JavaScript

Here is a simple script written in JavaScript that will disable right click to prevent user to view the code of your web page.

I am currently accepting programming work, it project, school programming projects , thesis and capstone projects, IT consulting work and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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.




Sample Program Output


Program Listing

rightclick.htm

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Disable righ-click menu</title>
<script language="javascript">
 function click() 
 {
    if (event.button==2)     
    {
    alert('Stop using right-click menu!');
    }
 }
 document.onmousedown=click; 
</script>
</head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<body oncontextmenu="return false;" >
<div>
  <div align="center">
    <p>&nbsp;</p>
    <p>Stop using right-click menu! </p>
 </div>
</div>
</body>
</html>





Print This Page in JavaScript

A very simple script which allows you to print the whole web page via a web browser using JavaScript as your programming language.

I am currently accepting programming work, it project, school programming projects , thesis and capstone projects, IT consulting work and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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.



Program Listing

print.htm

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Print this page</title>
</head>
<body>
<form name="form1" method="post" action="">
  <div align="center">
    <input type="submit" name="Submit" value="Print This Page" onClick="javascript:window.print()">
    </div>
</form>
</body>
</html>




Password Protects Web Page in JavaScript

A simple password protect web page script in JavaScript that I would like to share with you guys.

I am currently accepting programming work, it project, school programming projects , thesis and capstone projects, IT consulting work and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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.



Program Listing

password.htm

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Input Correct Password</title>
<style type="text/css">
.style1 {
font-size: 30px;
color: #FF00FF;
font-family: "Times New Roman", Times, serif;
font-weight: bold;
}
</style>
<script language="JavaScript">
var password="";
password=prompt('Please input a password, then you can visit our web page:');
if (password != '123admin')
{alert("Wrong password! You cannot visit our web page!");
window.close( );} 
</script>
</head>
<body>
<div align="center">
  <p>&nbsp;</p>
  <p class="style1">Password correct! </p>
  <p class="style1">Welcome to our website!!!</p>
</div>
</body>
</html>

Web Clock in JavaScript

Here is a good example of web clock written in JavaScript take note the time is very dependent on the computer that you are using.

I am currently accepting programming, IT consulting work and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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.

Sample Program Output


Program Listing

clock.htm


<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
</head>
<body>
<div align="center"><br>
  <br>
  <h2 >Web Clock in JavaScript</h2>
  <br>
</div>
<table bgcolor="lightblues" align=center>
<tr><td><div id="showClock"></div></td></tr>
</table>
<script language="javascript">
function webClock(){
var dataobj=new Date()
var hours=dataobj.getHours()
var minutes=dataobj.getMinutes()
var seconds=dataobj.getSeconds()
if(minutes<=9)
minutes="0"+minutes
if(seconds<=9)
seconds="0"+seconds
Eclock="<font size='7' color='white' face='Arial black'>"
+hours+":"+minutes+":"+seconds+"</font>"
showClock.innerHTML=Eclock;
setTimeout("webClock()",1000)
}
webClock();
</script>
</body>
</html>



Count how many letters in String in JavaScript

In this article I would like to share with you a sample program that will ask the user to give a string and then it will count how many letters in the given string.

I am currently accepting programming work, it project, school programming projects , thesis and capstone projects, IT consulting work and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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.




Sample Program Output


Program Listing

letterscount.html

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
</head>
<body>
<p align="left">Count how many letters in String in JavaScript<br>
</p>
<div align="left">
  <script language="JavaScript"> 
function cal(str)
    re=/[a-z & A-Z]/g;  
    if(re.test(str))       
    return str.match(re).length 
    else 
    return 0 
</script> 
<input onBlur="alert(cal(this.value) )">
<input type="button" value="Count Letters">
</div>
</body> 
</body>
</html>



Wednesday, April 11, 2018

Insert Record in Visual Basic NET and Microsoft Access

In this article I would like to share with you a program written by my close friend and a fellow software engineer Sir Jonathan Mandia it is a database application written in Microsoft Visual Basic NET and Microsoft Access. I will show you how to insert a record in Microsoft Access using Visual Basic NET as your programming language. I would like to say thank you to Sir Mandia for sharing his work the code is written in Visual Studio 2010 according to him.

I am currently accepting programming work, it project, school programming projects , thesis and capstone projects, IT consulting work and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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.







Sunday, April 8, 2018

Using Super Keyword in Java

A very simple program to demonstrate the use of Super keyword in Java.

I am currently accepting programming, IT consulting work and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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.


Program Listing

SuperDemo.java

package oop_java;

/**
 * NetBeans IDE 8.2
 * @author Mr. Jake R. Pomperada
 * March 30, 2018  Friday
 * Bacolod City, Negros Occidental
 */
class Super_class{
    
int test( int num ) { 
    return num;
    }
}

class Sub_class extends Super_class{ 
    
    int test( int num ) {
    return 300 + num;
    }
}
public class SuperDemo {
    public static void main (String args[ ]){
    Sub_class obj=new Sub_class( );
    System.out.println("Super Keyword in Java Demonstration");
    System.out.println("\n");
    System.out.print("The result is " + obj.test( 200 ));
    System.out.println("\n");
   }
}

Using This Keyword in Java

Here is a short and simple program to demonstrate the user of this keyword in Java.

I am currently accepting programming, IT consulting work and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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.



Program Listing


thisDemo.java



package oop_java;
/**
 * NetBeans IDE 8.2
 * @author Mr. Jake R. Pomperada
 * March 30, 2018  Friday
 * Bacolod City, Negros Occidental
 */
class thisDemo {
    
   String username;
   
void Greetings(String username) {
     this.username= username; // “this” represents the “person”
     System.out.println("Hello "+ this.username );
}

public static void main(String[ ] args) {
thisDemo person = new thisDemo();
System.out.println("this Keyword in Java Demonstration");
person.Greetings("Julianna Rae F. Pomperada");
System.out.println("\n");  
   }
}