Saturday 14 September 2013

how-to-allow-remote-access-to-my-wamp-server

goto wamp\alias and make modify following three files

  1. phpmyadmin.conf
  2. sqlbuddy.conf
  3. webgrind.conf

and replace

Order Deny,Allow
Deny from all
Allow from 127.0.0.1


with


Order Allow,Deny
Allow from all

solution 1 : demo 1 solution 2: demo 2

Monday 19 August 2013

jscheckbox

        CheckBox Validation Using javaScript          

Checkbox validation:

Example

<html>
<head>
<script LANGUAGE="JavaScript">
function ValidateForm(form){
ErrorText= "";
if ( ( form.gender[0].checked == false ) && ( form.gender[1].checked == false ) )
{
alert ( "Please choose your Gender: Male or Female" );
return false;
}
if (ErrorText= "") { form.submit() }
}
</script>
</head>
<body>
<form name="feedback" action="#" method=post>
Your Gender: <input type="radio" name="gender" value="Male"> Male
<input type="checkbox" name="gender" value="Female"> Female
<input type="checkbox" name="SubmitButton" value="Submit" onClick="ValidateForm(this.form)">
<input type="reset" value="Reset">
</form>
</body>
</html>


The Output is Shown Here:

               Your Gender:      Male Female
                                               

Checkbox Validation

Example

<html>
<head>
<script type="text/javascript">
function checkButton(){
if(document.form1.button1.checked == true){
alert("Box1 is checked");
} else if(document.form1.button2.checked == true){
alert("Box 2 is checked");
}
}
</script>
</head>
<body>
<form name="form1">
<input type="chechbox" name=button1>Box 1
<br> <input type="chechbox" name=button2 CHECKED>Box 2
<br> <INPUT type="button" value="Get Checked" onClick='checkButton()'>
</form>
</body>
</html>



The Output is Shown Here:

Box 1
Box 2

Checkbox Validation

Example

<html>
<head>
<script type="text/javascript">
function evalGroup()
{
var group = document.radioForm.myRadio;
for (var i=0; i<group.length; i++) {
if (group[i].checked)
break;
}
if (i==group.length)
return alert("No Checkbox is checked");
alert("Radio Button " + (i+1) + " is checked.");
}
</script>
</head>
<body>
<form name="radioForm">
Checkbox 1: <input type="chechbox" name="myRadio" /><br />
Chechbox 2: <input type="chechbox" name="myRadio" /><br />
Chechbox 3: <input type="chechbox" name="myRadio" /><br />
Chechbox 4: <input type="chechbox" name="myRadio" /><br /><br />
<input type="button" value="Eval Group" onclick="evalGroup()" />
</form>
</body>
</html>



The Output is Shown Here:

chechbox 1:
chechbox 2:
chechbox 3:
chechbox 4:


Checkbox Validation

Example

<html>
<head>
<script type="text/javascript">
var myFlag = false
function initValue() {
myFlag = document.forms[0].sizes[0].checked;
}
function sh(form) {
for (var i = 0; i < form.sizes.length; i++) {
if (form.sizes[i].checked) {
break;
}
}
alert(form.sizes[i].value);
}
function setmyFlag(setting) {
myFlag = setting;
}
function exitMsg() {
if (myFlag) {
alert("exit message.");
}
}
</script>
</head>
<body>
<form >
<input type="checkbox" name="sizes" value="1" checked="checked" onclick="setmyFlag(true)" />1
<input type="checkbox" name="sizes" value="2" onclick="setmyFlag(false)" />2
<input type="checkbox" name="sizes" value="7" onclick="setmyFlag(false)" /&g <input type="checkbox" name="sizes" value="5" onclick="setmyFlag(false)" />5
t;5
<input type="button" name="Viewer" value="View" onclick="sh(this.form)" />
</form>
</body>
</html>



The Output is Shown Here:

 1 2 7 5


address

        Address and Textarea Validation Using javaScript          

Textarea validation:

Example

<html>
<head>
<script type="text/javascript">
function validation()
{
var a = document.form.address.value;
if(a=="")
{
alert("Please Enter Your Details Here");
document.form.address.focus();
return false;
}
}
</script>
</head>
<body>
<form name="form" method="post" onsubmit="return validation()">
<tr>
<td> Address:</td>
<td><textarea name="address" cols="30" rows="4"></textarea></td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="sub" value="Submit"></td>
</tr>
</form>
</body>
</html>


The Output is Shown Here:

  Address:

Textarea Validation

Example

<html>
<head>
<script type="text/javascript">
function Validation()
{
var a = document.form.address.value;
if(a=="")
{
alert("please Enter the details");
document.form.address.focus();
return false;
}
if((a.length < 20) || (a.length > 100))
{
alert(" Your textarea must be 20 to 100 characters");
document.form.address.select();
return false;
}
}
</script>
</head>
<body>
<form name="form" method="post" onsubmit="return Validation()">
<tr>
<td> Address:</td>
<td><textarea name="address" cols="60" rows="10"></textarea></td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="sub" value="Submit"></td>
</tr>
</form>
</body>
</html>



The Output is Shown Here:

  Address:


        Username Validation Using javaScript          

Username validation:

Example

<html>
<head>
<script type="text/javascript">
function validation()
{
var a = document.form.name.value;
if(a=="")
{
alert("Please Enter Your Name");
document.form.name.focus();
return false;
}
}
</script>
</head>
<body>
<form name="form" method="post" onsubmit="return validation()">
<tr>
<td> Your Name:</td>
<td><input type="text" name="name""></td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="sub" value="Submit"></td>
</tr>
</form>
</body>
</html>


The Output is Shown Here:

  UserName:

Username Validation allows only Characters.

Example

<html>
<head>
<script type="text/javascript">
function validation()
{
var a = document.form.name.value;
if(a=="")
{
alert("Please Enter Your Name");
document.form.name.focus();
return false;
}
if(!isNaN(a))
{
alert("Please Enter Only Characters");
document.form.name.select();
return false;
}
}
</script>
</head>
<body>
<form name="form" method="post" onsubmit="return validation()">
<tr>
<td> Your Name:</td>
<td><input type="text" name="name""></td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="sub" value="Submit"></td>
</tr>
</form>
</body>
</html>



The Output is Shown Here:

  UserName:

Username Validation allows only Limited Characters.

Example

<html>
<head>
<script type="text/javascript">
function validation()
{
var a = document.form.name.value;
if(a=="")
{
alert("Please Enter Your Name");
document.form.name.focus();
return false;
}
if(!isNaN(a))
{
alert("Please Enter Only Characters");
document.form.name.select();
return false;
}
if ((a.length < 5) || (a.length > 15))
{
alert("Your Character must be 5 to 15 Character");
document.form.name.select();
return false;
}
}
</script>
</head>
<body>
<form name="form" method="post" onsubmit="return validation()">
<tr>
<td> Your Name:</td>
<td><input type="text" name="name""></td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="sub" value="Submit"></td>
</tr>
</form>
</body>
</html>



The Output is Shown Here:

  UserName:


phpanish auther anichandran introduction