EasyUI Forum
May 16, 2024, 12:21:10 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: About Form data & click submit post to php file.  (Read 10805 times)
kg
Newbie
*
Posts: 9


View Profile
« on: January 22, 2014, 02:17:14 AM »

Dear All,

I use easyui-linkbutton submit to post data to checklogin.php, but doesn't work.
Anyone can help me ?

Code:
<link rel="stylesheet" type="text/css" href="themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="themes/icon.css">
<script type="text/javascript" src="plugins/jquery-1.7.2.js"></script>
<script type="text/javascript" src="plugins/jquery.easyui.min.js"></script>


</head>

<body>
<h1>Login</h1>

<!--
<div class="demo-info">
<div class="demo-tip icon-tip"></div>
</div>
!-->
<div style="margin:10px 0;"></div>
<div class="easyui-panel" title="Login System" style="width:400px;padding:10px">
<form action="checklogin.php" method="post" id="flogon" >
<table>
<tr>
<td>Staff ID:</td>
<td><input class="easyui-validatebox" id="staffid" name="staffid" required="true" missingMessage="Please input your Staff ID!"></td>

</tr>
<tr>
<td>Password:</td>
<td><input name="upassword" type="password" class="easyui-validatebox" id="upassword" data-options="required:true"></td>
</tr>
<tr>
<td>
</td>
</tr>
</table>

</form>
    <div style="text-align:center;padding:5px">
    <a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()">Submit</a>
    <a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()">Clear</a>
    </div>
    <script>
    function submitForm(){
    $('#flogon').form('submit');
    }
    function clearForm(){
    $('#flogon').form('clear');
    }
    </script>
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: January 22, 2014, 06:22:42 PM »

Be sure to copy your page to the web site before running it using a browser. Please use firebug and switch to network panel to see if the form data is posted to server.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!