JavaCsript function call not working with <a href="">
Posted: Tue Dec 29, 2009 10:57 am
hi to all,
i m giving below the code of my web page, here is javascript function not working with <a href="javascript:functioncall()">
Please guide me.
thanks alot
--------------------------------------------------------------------------------------------------------------
<?
session_start();
session_register('s_id');
?>
<!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">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<head>
<link rel="stylesheet" type="text/css" href="global.css" title="os-co.biz"/>
<title>Untitled</title>
<link rel="icon" href="images/os-co.png">
<script src="global.js" type="text/javascript"></script>
</head>
<body>
<div class="main">
<div class="header">
<img src="images/home-header.jpg"/>
</div>
<div class="top-nev">
<table cellspacing="0" width="990" align="center">
<tr height="41" align="center">
<td width="11%"><a href="">Home</a></td>
<td width="16%"><a href="mission.html">Mission Statement</a></td>
<td width="11%"><a href="processing.html">Processing</a></td>
<td width="11%"><a href="products.html">Products</a></td>
<td width="11%"><a href="contacts.html">Contact us</a></td>
<td width="11%"><a href="query.html">Query</a></td>
<td width="11%"><a href="site_map.html">Site Map</a></td>
<td width="11%">
<?
if($_SESSION['s_id']!=1122)
{
?>
<a href="javascript:showDiv()">Login</a> ___This is not working
<span id="main" style="visibility:hidden">
<span id="hideshow">
<span class="front">
<form name="form1" method="post" action="check_login.php">
<table width="100%" border="0" cellpadding="3" cellspacing="1">
<tr valign="top">
<td align="left"><img src="images/login-icon.jpg"/></td>
<td> </td>
<td align="right"><a href="javascript:hideDiv()">Close</a></td>
</tr>
<tr align="center" valign="top">
<td colspan="3" ><strong> </strong></td>
</tr>
<tr align="center" valign="top">
<td colspan="3"> </td>
</tr>
<tr align="center" valign="top">
<td width="78" align="right">Username</td>
<td width="6"> </td>
<td width="294"><input name="name" type="text" id="name"></td>
</tr>
<tr align="center" valign="top">
<td align="right">Password</td>
<td> </td>
<td><input name="pass" type="password" id="pass"></td>
</tr>
<tr align="center" valign="baseline">
<td colspan="3" align="center">
<input type="submit" name="Submit" value="Login" onlclick="javascript:hideDiv()"> </td>
</tr>
</table>
</form>
</span>
</span>
</span>
<?
}
else
{
?>
<a href="logout.php">Logout</a>
</td>
<td width="13%">
<a href="data.php">DataBase</a>
</td>
<?
}
?>
</tr>
</table>
</div>
</body>
</html>
i m giving below the code of my web page, here is javascript function not working with <a href="javascript:functioncall()">
Please guide me.
thanks alot
--------------------------------------------------------------------------------------------------------------
<?
session_start();
session_register('s_id');
?>
<!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">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<head>
<link rel="stylesheet" type="text/css" href="global.css" title="os-co.biz"/>
<title>Untitled</title>
<link rel="icon" href="images/os-co.png">
<script src="global.js" type="text/javascript"></script>
</head>
<body>
<div class="main">
<div class="header">
<img src="images/home-header.jpg"/>
</div>
<div class="top-nev">
<table cellspacing="0" width="990" align="center">
<tr height="41" align="center">
<td width="11%"><a href="">Home</a></td>
<td width="16%"><a href="mission.html">Mission Statement</a></td>
<td width="11%"><a href="processing.html">Processing</a></td>
<td width="11%"><a href="products.html">Products</a></td>
<td width="11%"><a href="contacts.html">Contact us</a></td>
<td width="11%"><a href="query.html">Query</a></td>
<td width="11%"><a href="site_map.html">Site Map</a></td>
<td width="11%">
<?
if($_SESSION['s_id']!=1122)
{
?>
<a href="javascript:showDiv()">Login</a> ___This is not working
<span id="main" style="visibility:hidden">
<span id="hideshow">
<span class="front">
<form name="form1" method="post" action="check_login.php">
<table width="100%" border="0" cellpadding="3" cellspacing="1">
<tr valign="top">
<td align="left"><img src="images/login-icon.jpg"/></td>
<td> </td>
<td align="right"><a href="javascript:hideDiv()">Close</a></td>
</tr>
<tr align="center" valign="top">
<td colspan="3" ><strong> </strong></td>
</tr>
<tr align="center" valign="top">
<td colspan="3"> </td>
</tr>
<tr align="center" valign="top">
<td width="78" align="right">Username</td>
<td width="6"> </td>
<td width="294"><input name="name" type="text" id="name"></td>
</tr>
<tr align="center" valign="top">
<td align="right">Password</td>
<td> </td>
<td><input name="pass" type="password" id="pass"></td>
</tr>
<tr align="center" valign="baseline">
<td colspan="3" align="center">
<input type="submit" name="Submit" value="Login" onlclick="javascript:hideDiv()"> </td>
</tr>
</table>
</form>
</span>
</span>
</span>
<?
}
else
{
?>
<a href="logout.php">Logout</a>
</td>
<td width="13%">
<a href="data.php">DataBase</a>
</td>
<?
}
?>
</tr>
</table>
</div>
</body>
</html>