社区
Ajax
帖子详情
Ajax & PHP without using the XmlHttpRequest Object
kangqin
2006-03-22 10:47:31
http://www.phpit.net/article/ajax-php-without-xmlhttprequest/
...全文
96
1
打赏
收藏
Ajax & PHP without using the XmlHttpRequest Object
http://www.phpit.net/article/ajax-php-without-xmlhttprequest/
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
1 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
supNate
2006-03-22
打赏
举报
回复
好思路!
其实不仅php可用,任何服务器技术均可!
外文翻译-
XMLHttpRequest
对象的使用
Using
_the_
XMLHttpRequest
_
Object
Using
the
XMLHttpRequest
Object
Now that we’ve discussed the history of dynamic Web applications and introduced
Ajax
, it’s time to cover the heart of the matter: how to use the
XMLHttpRequest
object
. While
Ajax
is more of a technique than a technology, without widespread support for
XMLHttpRequest
, Google Suggest and Ta-da List wouldn’t exist as we currently know them. And you wouldn’t be reading this book!
AJAX
+
PHP
+MYSQL聊天室
AJAX
driven simple chat
Detailed description:
This class can be used to implement a simple Web based chat system that uses
AJAX
to update the chat dialog display area without reloading the whole page.
这类可以用来实现基于聊天系统的简单网络。此聊天系统使用
AJAX
更新闲谈对话显示区而无需重新调入页面
The class generates a page with a Web form to submit what each chat line that the users type.
这类产生 Web form形式的网页
The chat lines are sent to the server
using
a
XMLHttpRequest
object
.
使用
XMLHttpRequest
对象将chat lines发到服务器
The chat lines are received by a server side script that uses the class to store what each user entered in a MySQL database table.
服务器端接受了chat lines,并用它来储存用户送进MySQL数据库表的数据。
In response, the class outputs the chat list already formatted to by displayed in the user browser pages.
相应地,在用户浏览网页时,它输出已经被格式化显示的的聊天列表。
AJAX
and
PHP
.pdf
AJAX
is a complex phenomenon that means different things to different people. Computer users appreciate that their favorite websites are now friendlier and feel more responsive. Web developers learn new skills that empower them to create sleek web applications with little effort. Indeed, everything sounds good about
AJAX
! At its roots,
AJAX
is a mix of technologies that lets you get rid of the evil page reload, which represents the dead time when navigating from one page to another. Eliminating page reloads is just one step away from enabling more complex features into websites, such as real-time data validation, drag-and-drop, and other tasks that weren't traditionally associated with web applications. Although the
AJAX
ingredients are mature (the
XMLHttpRequest
object
, which is the heart of
AJAX
, was created by Microsoft in 1999), their new role in the new wave of web trends is very young, and we'll witness a number of changes before these technologies will be properly used to the best benefit of the end users.
AJAX
isn't, of course, the answer to all the Web's problems, as the current hype around it may suggest. As with any other technology,
AJAX
can be overused, or used the wrong way.
AJAX
also comes with problems of its own: you need to fight with browser inconsistencies,
AJAX
-specific pages don't work on browsers without JavaScript, they can't be easily bookmarked by users, and search engines don't always know how to parse them. Also, not everyone likes
AJAX
. While some are developing enterprise architectures
using
JavaScript, others prefer not to use it at all. When the hype is over, most will probably agree that the middle way is the wisest way to go for most scenarios. In
AJAX
and
PHP
: Building Modern Web Applications – Second Edition, we take a pragmatic and safe approach by teaching relevant patterns and best practices that we think any web developer will need sooner or later. We teach you how to avoid the common pitfalls, how to write efficient
AJAX
code, and how to achieve functionality that is easy to integrate into current and future web applications, without requiring you to rebuild the whole solution around
AJAX
. You'll be able to use the knowledge you learn from this book right away, in your
PHP
web applications. What this book covers Chapter 1: The World of
AJAX
and
PHP
is all about a quick introduction to the world of
AJAX
. In order to proceed with learning how to build
AJAX
applications, it's important to understand why and where they are useful. It describes the
XMLHttpRequest
object
, which is the key element that enables the client-side JavaScript code to call a page on the server asynchronously. Chapter 2: JavaScript and the
AJAX
Client walks you through many fields such as working with HTML, JavaScript, CSS, the DOM, XML, and
XMLHttpRequest
. It discusses the theory (and practice) that you will need to know to make these components come together smoothly, and form a solid foundation for your future
AJAX
applications. It also shows you how to implement simple error-handling techniques, and how to write code efficiently. Chapter 3:
Object
Oriented JavaScript covers a large area of what
object
-oriented programming means in the world of JavaScript starting from basic features and going far into the execution context of functions. It teaches you the basic OOP concepts—encapsulation, polymorphism, and inheritance, how to work with JavaScript
object
s, functions, classes, and prototypes, how to simulate private, instance, and static class members in JavaScript, what the JavaScript execution context is, how to implement inheritance by
using
constructor functions and prototyping, and the basics of JSON. Chapter 4:
Using
PHP
and MySQL on the Server starts putting the server to work,
using
PHP
to generate dynamic output, and MySQL to manipulate and store the backend data. This chapter shows you how to use XML and JSON with
PHP
(so that you can create server-side code that communicates with your JavaScript client), how to implement error-handling code in your server-side
PHP
code, and how to work with MySQL databases. Chapter 5:
AJAX
Form Validation creates a form validation application that implements traditional techniques with added
AJAX
flavor, thereby making the form more user-friendly, responsive, and pleasing. The intention of this chapter isn't to build the perfect validation technique but, rather, a working proof of concept that takes care of user input and ensures its validity. Chapter 6: Debugging and Profiling
AJAX
Applications teaches how to enable and use Internet Explorer's debugging capabilities. It shows how you can work with Web Development Helper, Developer Toolbar, and other Internet Explorer tools and with Firefox plugins such as Firebug, Venkman JavaScript Debugger, and Web Developer. This material is copyright and is licensed for the sole use by ALESSANDRO CAROLLO on 18th December 2009 6393 south jamaica court, , englewood, , 80111 Preface [ 3 ] Chapter 7: Advanced Patterns and Techniques briefly covers some of the most important patterns and techniques covering usability, security, and techniques. Looking at methods, patterns, and techniques is so important that it has developed into its own science and has created a set of guidelines for typical problems that offer us predictable results. Chapter 8:
AJAX
Chat with jQuery teaches how to use
AJAX
to easily implement an online chat solution. This will also be your opportunity to use one of the most important JavaScript frameworks around—jQuery. More precisely, this chapter will explain the basics of jQuery and show how to create a simple, yet efficient client- server chat mechanism
using
AJAX
. Chapter 9:
AJAX
Grid explains the usage of an
AJAX
-enabled data grid plugin, jqGrid. Appendix: Preparing Your Working Environment covers the installation instructions that set up your machine for the exercises in this book. It also covers preparing the database that is used in many examples throughout the book. What you need for this book To go through the examples in this book you need
PHP
5, a web server, and a database server. We have tested the code under several environments, but mostly with the Apache 2 web server, and MySQL 4.1 and MySQL 5 databases. You can choose, however, to use another web server, or another database product, in which case the procedures presented in the chapters might not be 100% accurate. It is important to have
PHP
5 or newer, because we use some features, such as
Object
Oriented Programming support, which aren't available in older versions. Please read the appendix for more details about setting up your machine. If your machine already has the required software, you still need to read the final part of appendix, where you are instructed about creating a database that is used for the examples in this book. Who this book is for This book is written for
PHP
developers who want to learn how to use
PHP
, JavaScript, MySQL, and jQuery to implement Web 2.0 applications, are looking for a step-by-step, example-driven
AJAX
tutorial, want to learn advanced
AJAX
coding patterns and techniques, and want to be able to assess the security and SEO implications of their code.
Packtpub.Instant.Firebug.Starter.Jan.2013.pdf
With the advent of RIAs (Rich Internet Applications), most web pages are driven by a combination of JavaScript,
AJAX
, CSS, and so on. It is difficult for front end and web developers to debug and fix issues that crop up on client machines. Firebug helps to solve this; it is a wonderful toolkit to help identify and fix issues that would ordinarily take much longer to find and fix. Instant Firebug Starter is a practical, hands-on guide that provides you with a number of clear step-by-step exercises to help you take advantage of the full power that Firebug offers. This book will give you a great grounding in
using
Firebug to debug, fix, and optimize your web pages. From installation to navigating the various panels to edit, inspect, and modify your webpages, this practical guide will help you through the wilds of Firebug without a single bite. A step-by-step description of key features is provided with the help of simple and concise examples. Each chapter will help you understand the key features of Firebug with tips and tricks that will become the foundation of your knowledge in the future. The Instant Firebug Starter can be used as an end-to-end guide or as a desk reference with sections that deal with all the key aspects of web development like CSS, Javascript, and
AJAX
. This Instant Firebug Starter guides you through the basics of Firebug and contains years’ worth of industry knowledge and expertise. This knowledge has been stripped back to 60 pages of useful insights, tips, tricks, and the latest techniques that will get you up to speed in no time. What you will learn from this book Get to grips with the basics of Firebug’s panels and their functions. Inspect, edit and play with HTML sources. Discover various ways to analyze the performance of your web application on the browser. Track
XmlHttpRequest
and XmlHttpResponse as well as monitoring
AJAX
calls. Explore the value of properties and constants of any DOM
object
. Monitor, edit, and remove cookies from Firebug. Approach Get to grips with a new technology, understand what it is and what it can do for you, and then get to work with the most important features and tasks. This easy to understand Starter guide will get you up to speed with Firebug quickly and with little effort. Hands-on and practical examples allow you to get a feel for the tool and get used to
using
it on a day-to-day basis. Who this book is written for If you are just starting out with web development and looking to improve your site with Firebug, then this guide is for you. If you have a basic understanding of web development then this guide is easy to follow and will benefit your site no end.
关于
AJAX
的N篇贴子整理
[ZT]老技术新外衣 如何设计一个包含
Ajax
技术的
PHP
网页掌握
Ajax
,第 1 部分:
Ajax
简介[转帖]掌握
Ajax
,第 2 部分: 使用 javascript 和
Ajax
发出异步请求[转帖]
AJAX
实例学习手记
AJAX
学习实例(二)无刷新上传[技术交流]
Ajax
&
PHP
without
using
the
XmlHttpRequest
Object
PHP
+
AJAX
实现无刷新
Ajax
52,797
社区成员
25,305
社区内容
发帖
与我相关
我的任务
Ajax
Web 开发 Ajax
复制链接
扫一扫
分享
社区描述
Web 开发 Ajax
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章