hai all,
i am having 2 pages. login.html and city.html
login.html
City.html
My problem is while redirecting page in city.html to login.html(when user name not given) the city.html page is shown for a fraction of second. how can i avoid this.
Thanx in advance
i am having 2 pages. login.html and city.html
login.html
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitled Page</title>
<script language="javascript" type="text/javascript">
function validateuser()
{
var user= document.getElementById("Text1").value;
if (user=="admin")
{
window.location="city.html?name="+user;
}
else
{
alert("Login Failed");
document.getElementById("Text1").value="";
document.getElementById("Text1").focus();
}
}
</script>
</head>
<body>
<input id="Text1" type="text" />
<input id="Button1" type="button" value="LOGIN" onclick="validateuser()"/>
</body>
</html>
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>CITY Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<link href="Styles/EIMS_blue.css" rel="stylesheet" type="text/css"/>
<script language="javascript" type="text/javascript">
function getsession()
{
var sessionvalue=document.getElementById("sessiondemo").value;
}
getvalues();
function getvalues()
{
document.getElementById("username").value="";
var parameterArray =unescape(self.location.search).substring(1).split( "&");
var param=parameterArray[0];
var param1=new Array();
param1 = param.split('=');
document.getElementById("username").value=param1[1];
if(document.getElementById("username").value=="undefined")
{
window.location="login.html";
}
}
</script>
</head>
<body>
<script type="text/javascript" src="Scripts/Loaders_Collection.js"></script>
<input type="text" id="username" />
<table style ="width:100%; height:100%;" border="0" class="page_bg">
<tr style ="width: 100%;">
<td style="width:100%;height:126px">Header Area Sample</td>
</tr>
<tr style ="width:100%;">
<td style="width:100%;">
<table style="width:100%; height:100%;" border="0">
<tr style ="width: 100%;">
<td>Menu Area Sample</td>
<td>
</td>
</tr>
</table>
</td>
</tr>
<tr style ="width:100%;">
<td style="width:100%;">Footer Area</td>
</tr>
</table>
</body>
</html>
Thanx in advance
Comment