|
|
|
ดู ให้ทีครับว่ามันผิดตรงไหน พอดี ผมอยากตรวจสอบ text boxให้ค่ามันไม่ว่างอ่ะครับ |
|
|
|
|
|
|
|
ดันๆๆ
|
|
|
|
|
Date :
2011-05-21 14:42:36 |
By :
macro |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
document.form1.submit();
เปลี่ยนเป็น return true;
|
|
|
|
|
Date :
2011-05-21 14:46:29 |
By :
PlaKriM |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ยังไม่ได้อ่ะครับ งง เหมือนกับว่ามันไม่เห้นคำสั่ง จาวา อ่ะ ครับ
|
ประวัติการแก้ไข 2011-05-21 14:56:58
|
|
|
|
Date :
2011-05-21 14:55:14 |
By :
macro |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (JavaScript)
<script language="javascript">
function fncSubmit()
{
with(form1)
{
if(username.value == "")
{
alert('Please input User name');
username.focus();
return false;
}
}
with(form1)
{
if(Password.value == "")
{
alert('Please input Password ');
Password.focus();
return false;
}
}
with(form1)
{
if(name.value =="")
{
alert('Please input Your name');
name.focus();
return false ;
}
}
with(form1)
{
if(surname.value =="")
{
alert('Please input surname');
surname.focus();
return false ;
}
}
}
</script>
|
|
|
|
|
Date :
2011-05-21 14:58:03 |
By :
naked13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ก็ ยัง ไม่ได้อยู่ดีนั้นล่ะครับ ผม ลองทั้ง 2 วิธีล่ะ T-T
|
|
|
|
|
Date :
2011-05-21 15:08:05 |
By :
macro |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ลองเอา Copy Code ที่หนูเขียนไปแทนนะคะ
คือ ที่เครื่องหนูก็รันได้ ทำงานปกตินะคะ
|
|
|
|
|
Date :
2011-05-21 15:10:53 |
By :
naked13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
<?php session_start();
if(!session_is_registered('loginname')){
header("location:formlogin.php");
}
/* echo $_SESSION['loginname'];
echo $_SESSION['pw']; */
$name = $_SESSION['loginname'];
$pass = $_SESSION['pw'];
include "../include/connect1.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License
Name : Majestic
Description: A three-column, fixed-width blog design.
Version : 1.0
Released : 20090713
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Majesticby Free CSS Templates</title>
<meta name="keywords" content="" />
<meta name="Majestic" content="" />
<link href="default.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<script language="javascript">
function fncSubmit()
{
with(form1)
{
if(username.value == "")
{
alert('Please input User name');
username.focus();
return false;
}
}
with(form1)
{
if(Password.value == "")
{
alert('Please input Password ');
Password.focus();
return false;
}
}
with(form1)
{
if(name.value =="")
{
alert('Please input Your name');
name.focus();
return false ;
}
}
with(form1)
{
if(surname.value =="")
{
alert('Please input surname');
surname.focus();
return false ;
}
}
}
</script>
<p>
<!-- start header -->
<div id="header">
<div id="logo">
<h1><a href="#">Shift Schedule Management System</a></h1>
<p></p>
</div>
<div id="menu">
<ul>
<li><a href="#" class="current_page_item">Home</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">Photos</a></li>
<li><a href="#">Links</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
</div>
<!-- end header -->
<!-- start page -->
<div id="page">
<div id="page-bg">
<div id="sidebar1" class="sidebar">
<div id="sidebar1-bgtop">
<div id="sidebar1-bgbtm">
<ul>
<li>
<h2>Main Menu</h2>
<ul><li><a href="admin.php">Inseart User</a></li>
<li><a href="deleteuser.php">Delecte User</a></li>
<li><a href="edituser.php">Update User</a><a href="index.php"></a></li>
<li><a href="selectbynamecom.php">Search User</a></li>
<li><a href="index.php">Log out </a></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!-- start content -->
<div id="content">
<div id="content-bgtop">
<div id="content-bgbtm">
<tr>
<th align="" scope="row"><form id="form1" method="post" action="registercom.php" onsubmit="JavaScript:return fncSubmit();">
</p>
<p> </p>
<p> Username :
<input type="text" name="username" id="username" />
</p>
<p> Password :
<input type="password" name="Password" id="Password" />
</p>
<p> name :
<input type="text" name="name" id="name" />
</p>
<p> surname :
<input type="text" name="surname" id="surname" />
</p>
<p> Position :
<input type="text" name="Position" id="Position" />
</p>
<p> Start date :
<input type="text" name="startdate" id="startdate" />
</p>
<p> *** YYY-MM-DD*** </p>
<p> End date :
<input type="text" name="enddate" id="enddate" />
</p>
<p> *** YYY-MM-DD***</p>
<p> Grade and step :
<input type="text" name="gradeandstep" id="gradeandstep" />
</p>
<p>
<input type="submit" name="Register" id="Register" value="Register" />
</p>
</form> </th>
</tr></center>
<p></p>
</div>
</div>
</div>
<!-- end content -->
<!-- start sidebars -->
<!-- end sidebars -->
<div style="clear: both;"> </div>
</div>
</div>
<!-- end page -->
<div id="footer">
<p class="copyright">© 2009 All Rights Reserved • Developed by wichan sangwondee .</p>
<p class="link"><a href="#">Privacy Policy</a> • <a href="#">Terms of Use</a></p>
</div>
</body>
</html>
|
ประวัติการแก้ไข 2011-05-21 15:26:21 2011-05-21 15:53:55
|
|
|
|
Date :
2011-05-21 15:25:02 |
By :
naked13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|