EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: kg on January 22, 2014, 02:17:14 AM



Title: About Form data & click submit post to php file.
Post by: kg 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>


Title: Re: About Form data & click submit post to php file.
Post by: stworthy 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.