sunilpandya
06-02-2013, 03:41 PM
Following are my webpage which include javascript code. To check I press submit button without inserting any record, but all the browser shows blank screen, what could be the reason
<!DOCTYPE html>
<html lang="en">
<head>
<title>User Registration Page of SPINFONET.COM</title>
<link rel="stylesheet" type="text/css" href="homepage.css">
<meta name="description" content="Website for Jobs,Matrimony,Property listing in India."/>
<meta name="keywords" content="Jobs, searching jobs, jobsearch,jobs in india, Brides,Brides and groom search, House,Flat,Plots,Bunglows,Industrial sheds search,property search"/>
<meta name="keyphrase" content="Job search,Property search, Bride and groom search"/>
<meta name="Title" content="Search Jobs,matrimony, property in India"/>
<meta name="Owner" content="spinfonet.com"/>
<meta name="Author" content="spinfonet.com"/>
<meta name="classification" content="Jobs,matrimony,property search in india, Online search"/>
<meta name="distribution" content="global"/>
<meta name="rating" content="General"/>
<meta name="subject" content="Jobs, Matrimony,property search in idnai"/>
<meta name="page-type" content="Jobs,matrimony,property - India"/>
<meta name="audience" content="all"/>
<meta name="robots" content="all"/>
<meta name="language" content="English"/>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
<meta name="robots" content="noodp"/>
<script type="text/javascript">
function validateForm()
{
var x=document.forms["jobseekeruser"]["username"].value;
if (x==null || x=="")
{
alert("User name must be filled out");
return false;
}
{
var userexp = /^[a-z0-9_-]{5,16}$/
if( !userexp.test(document.jobseekeruser.username.value))
alert("Enter valid username with character,number,uderscorer or dot");
else
alert("Name entered successfully");
}
var p=document.forms["jobseekeruser"]["password"].value;
if(p==null || p== "")
{
alert("Password must be filled out");
var passexp = /^[a-z0-9@]{5,16}$/
if(!passexp.test(document.jobseekeruser.password.value))
alret("Enter valid password with character '@' number");
else
alert("Password entered successfully");
}
var m=document.forms["jobseekeruser"]["emailid"].value;
if (m==null || m=="")
{
alert(Emailid must be filled out");
return false;
}
{
var mexp =/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/
if(!mexp.test(document.jobseekeruser.emailid.value))
alert("Enter Valid username")
else
("OK Emailid is correct")
}
}
</script
</head>
<body>
<img alt="S p logo.jpg" src="S p logo.jpg" height="200" width="200" />
<div class="topnav">
<ul>
<li><a href="http://www.spinfonet.com/index.html">Home</a></li>
<li><a href="http://www.spinfonet.com/jobseeker.html">jobseeker</a></li>
<li><a href="http://www.spinfonet.com/jobseekeruser.html">Newuser</a></li>
</ul>
</div>
<div class="usertable">
<form action="jobseeker.php" name="jobseekeruser" onsubmit="return validateForm()" method="post">
<table>
<tr>
<td>Username :*</td>
<td><input type="text" name="username"></td>
</tr>
<tr>
<td>Password :*</td>
<td><input type="password" name="password"></td>
</tr>
<tr>
<td>Emailid :*</td>
<td><input type="text" name="emailid"></td>
</tr>
<tr>
<td><input type="submit" value="Submit" /></td>
<td><input type="reset" value="Reset"</td>
</tr>
</form>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<title>User Registration Page of SPINFONET.COM</title>
<link rel="stylesheet" type="text/css" href="homepage.css">
<meta name="description" content="Website for Jobs,Matrimony,Property listing in India."/>
<meta name="keywords" content="Jobs, searching jobs, jobsearch,jobs in india, Brides,Brides and groom search, House,Flat,Plots,Bunglows,Industrial sheds search,property search"/>
<meta name="keyphrase" content="Job search,Property search, Bride and groom search"/>
<meta name="Title" content="Search Jobs,matrimony, property in India"/>
<meta name="Owner" content="spinfonet.com"/>
<meta name="Author" content="spinfonet.com"/>
<meta name="classification" content="Jobs,matrimony,property search in india, Online search"/>
<meta name="distribution" content="global"/>
<meta name="rating" content="General"/>
<meta name="subject" content="Jobs, Matrimony,property search in idnai"/>
<meta name="page-type" content="Jobs,matrimony,property - India"/>
<meta name="audience" content="all"/>
<meta name="robots" content="all"/>
<meta name="language" content="English"/>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
<meta name="robots" content="noodp"/>
<script type="text/javascript">
function validateForm()
{
var x=document.forms["jobseekeruser"]["username"].value;
if (x==null || x=="")
{
alert("User name must be filled out");
return false;
}
{
var userexp = /^[a-z0-9_-]{5,16}$/
if( !userexp.test(document.jobseekeruser.username.value))
alert("Enter valid username with character,number,uderscorer or dot");
else
alert("Name entered successfully");
}
var p=document.forms["jobseekeruser"]["password"].value;
if(p==null || p== "")
{
alert("Password must be filled out");
var passexp = /^[a-z0-9@]{5,16}$/
if(!passexp.test(document.jobseekeruser.password.value))
alret("Enter valid password with character '@' number");
else
alert("Password entered successfully");
}
var m=document.forms["jobseekeruser"]["emailid"].value;
if (m==null || m=="")
{
alert(Emailid must be filled out");
return false;
}
{
var mexp =/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/
if(!mexp.test(document.jobseekeruser.emailid.value))
alert("Enter Valid username")
else
("OK Emailid is correct")
}
}
</script
</head>
<body>
<img alt="S p logo.jpg" src="S p logo.jpg" height="200" width="200" />
<div class="topnav">
<ul>
<li><a href="http://www.spinfonet.com/index.html">Home</a></li>
<li><a href="http://www.spinfonet.com/jobseeker.html">jobseeker</a></li>
<li><a href="http://www.spinfonet.com/jobseekeruser.html">Newuser</a></li>
</ul>
</div>
<div class="usertable">
<form action="jobseeker.php" name="jobseekeruser" onsubmit="return validateForm()" method="post">
<table>
<tr>
<td>Username :*</td>
<td><input type="text" name="username"></td>
</tr>
<tr>
<td>Password :*</td>
<td><input type="password" name="password"></td>
</tr>
<tr>
<td>Emailid :*</td>
<td><input type="text" name="emailid"></td>
</tr>
<tr>
<td><input type="submit" value="Submit" /></td>
<td><input type="reset" value="Reset"</td>
</tr>
</form>
</body>
</html>