I make a website by this way(get data from php+mysql and insert to dom
tree). But I don't konw why sometimes can list data, sometimes it is
nothing, sometimes crashed the browser. Anyone may give me advice?
thanks so mush ! http://www.midsunshine.com
On Jul 11, 8:41 am, Xinhao Zheng <[EMAIL PROTE
How so?
If I understand correctly, Xinhao wants to create a PHP script which can
provide JSON data when requested. The only method of doing this is by
outputting it.
It is possible to make the script only output if requested by the
XmlHttpRequest object, but this is very easily spoofed, and the re
Is impossible to use the cookies? To achieve what Benjamin wants to
do.
Sorry for my english. Saludos from México.
I do agree with Rob, if you are going to be passing info thru ajax it will
be displayed.
On 7/11/07, Rob Desbois <[EMAIL PROTECTED]> wrote:
Xinhao,
The only way to return data from server to client (PHP -> jQuery in this
case) is by 'displaying' it in PHP - in other words using echo, print o
Xinhao,
The only way to return data from server to client (PHP -> jQuery in this
case) is by 'displaying' it in PHP - in other words using echo, print or
something similar.
This does mean that anyone could look at what your javascript is doing and
do the same, unfortunately there's not much you
hi Benjamin,
It's very nice for your reply.Thanks a lot!Your advice does help
me,but i have another problem.
If i don't like the php file to display the data.Because if someone
who view the js source will see the url and can request the url in the
navigator and get the data.Can i just return
Xinhao,
Welcome to the list;
The way I usually do it is something like this:
php (returns json):
echo '{id:1,fname:"Benjamin",lname:"Sterling"}';
javascript:
$.ajax({
dataType:'json',
url:'mypage.php',
success : function(info){
// do something with with "info"
// call return by doing something
7 matches
Mail list logo