Introduction and Trial of PHP Ajax

Source: Internet
Author: User
Tags modify reset table name client

Please enter the text box in PHP(as the current mainstream development language) Ajax(Dynamic Web site static) Framework Xajax(Dynamic Web site Static) Introduction and trial

A comparison of Xajax(Dynamic Web site static) and other Ajax(Dynamic Web site static) Framework
Xajax(dynamic website static) function is very simple, but very flexible! ~ It's not like some other big frame, the function is really powerful, but the execution speed is not flattering. Although many functions, but not flexible. With more APIs, it's like learning a new language.
Two, Xajax(dynamic website Static) function Introduction
Xajax(Dynamic Web site static) function is relatively simple, but because of simplicity, so flexible. At the same time, it also requires the user to have a certain understanding of the Javascrīpt/vbs client script. Because its function is comparatively alive. Can say simply use Xajax(dynamic website static), nothing can do, but with js/vbs and what all do out.
Xajax(Dynamic Web site static) is mainly the use of Xajax(Dynamic Web site static)response This class, it provides a number of methods, for example:
1, Addalert ($SMSG)
Pop-up warning
2, addscrīpt ($sJS)
Perform a segment of JS
3, $objResponse->addassign ("", "", "")
Attach a value to an element in a page, or modify its properties
Wait a minute....

So Xajax(dynamic website static) is not dead, it cannot make xxx xxx function, but it can control the client's Js/vbs flexibly, to complete the effect we want to achieve.

Third, Xajax(Dynamic Web site static) installation configuration
No special installation and configuration required, just download its package and extract it into the site directory
Download Address:
Http://www.xajax(dynamic website static)project.org/

Third, the useof xajax (Dynamic Web site static) to do member registration and landing
1. Database
MySQL(and PHP with the best combination)5.0, database name ZL table name Zl_user table structure
ID int (one) auto_increment
Zl_user varchar (50)
Zl_pwd varchar (50)
Email varchar (50)

http://blog.knowsky.com/

2, reg.php(as the current mainstream development language) registration file (with instructions)

<?php(as the current mainstream development language)
Require_once ("Inc/xajax(Dynamic Web site static). inc.php(as the current mainstream development language)");
Using Xajax(Dynamic Web site static)You must first introduce Xajax(Dynamic Web site static). inc.php(as the current mainstream development language)
$xajax(Dynamic Web site static)= new Xajax(Dynamic Web site static)("inc/signup.php(as the current mainstream development language)");
Create a Xajax(Dynamic Web site static)Object, for singup.php(as the current mainstream development language)
$xajax(Dynamic Web site static)->registerfunction ("ProcessForm");
Using singup.php(as the current mainstream development language)The ProcessForm function in
?>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/>
<link rel= "stylesheet" href= "Http://blogbeta.blueidea.com/css/style.css" _fcksavedurl= "" http:// Blogbeta.blueidea.com/css/style.css "" Type= "Text/css" >
<title> Untitled Document </title>
<?php(as the current mainstream development language)$xajax(Dynamic Web site static)->printjavascrīpt (' inc/');?>
<scrīpt type= "Text/javascrīpt" >
function Submitsignup ()
{
Xajax(Dynamic Web site static). $ (' Submitbutton '). Disabled=true;
Xajax(Dynamic Web site static). $ (' Submitbutton '). value= "Http://blogbeta.blueidea.com/wait ...";
To modify an attribute with ID Submitbutton
Xajax(Dynamic Web site static)_ProcessForm (Xajax(Dynamic Web site static). Getformvalues ("Signupform"));
Here Xajax(Dynamic Web site static)_ followed by which function to use here is ProcessForm, followed by the signupform of this form of the collection of items
return false;
}
</scrīpt>
<body><form id= "Signupform" action= "javascrīpt:void (null);" ōnsubmit= "Submitsignup ();" >
<div id= "Main" >
<div id= "M1" > User registration </div>
<div id= "Formdiv" >
<table width= "100%" border= "0" cellspacing= "0" cellpadding= "5" >
<tr>
&LT;TD align= "right" > </td>
<td> </td>
</tr>
<tr>
&LT;TD width= "31%" align= "right" > Username:</td>
&LT;TD width= "69%" ><input name= "usr" type= "text" id= "usr"/>
*</td>
</tr>
<tr>
&LT;TD align= "Right" > Password:</td>
<td><input name= "pwd" type= "password" id= "pwd"/>
*</td>
</tr>
<tr>
&LT;TD align= "Right" > Password:</td>
<td><input name= "pwd2" type= "password" id= "Pwd2"/>
*</td>
</tr>
<tr>
&LT;TD align= "right" >Email:</td>
<td><input name= "Email" type= "text" id= "email"/>
* Can be used to retrieve the password </td>
</tr>
&LT;TR align= "center" >
&LT;TD colspan= "2" ><input type= "Submit" Name= "Submitbutton" value= "submitted" class= "button"/>
<input type= "reset" name= "Submit2" value= "reset" class= "button"/></td>
</tr>
</table>
</div>
</div>
</form>
</body>



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.