RE: [PHP] PHP/Ajax Framework - Call for Developers Testers

2009-08-21 Thread Bob McConnell
From: Raymond Irving

 Hi Nathan,
 
 I agree with you, and I believe that there are many persons
 who don't like the idea of hosting all their applications on
 a third party server. IMO there are some advantages and
 disadvantages to doing so but that's a discussion in itself.

Hosted servers are basically a trade off between doing it yourself and
paying someone else to do it. The initial choice is between installing
your own servers or spend the money to rent servers from someone else.
Most of the time it is actually the network bandwidth issue that decides
this. Can you afford a network connection that will handle the peak
loads but be unused most of the time?

But once you decide to pay someone else, you have another set of trade
offs to negotiate. What services do they provide? What systems do they
offer? How do they manage version control and updates? Are they PCI
compliant? There are a wide range of options available in the market.
Not all of them will fit your specific needs.

We just moved most of our servers from a physical hosting service to a
managed service. Where we used to maintain the OS and all software on
the server, the new service now handles that for us. The trade off is
that now we have to settle for the server package they offer. That means
we get the versions of Apache, PHP and PostgreSQL that were included in
the last production release of RHEL. If we want a newer version of PHP,
we have to take over maintenance of that component. It becomes our
responsibility to install the updates, patches, etc., for that
component.

Once you get beyond a private web site these types of decisions become
part of the management process, just as make or buy decisions are part
of the hardware procurement process. There are people out there making a
good living just guiding companies through this decision making process.

Bob McConnell

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP/Ajax Framework - Call for Developers Testers

2009-08-20 Thread Nathan Nobbe
On Wed, Aug 19, 2009 at 8:57 PM, Raymond Irving xwis...@yahoo.com wrote:

 Hi Nathan,

 Many thanks for the feedback. There many other useful features built into
 the API but my favorite is the embedded feature.

 You can see a live example here:
 http://raxanpdi.com/shoutbox-embedded-example.html



ive seen lots of third parties selling components in this manor.  now that
ajax has hit the scene there are some really weird things going on.

i was just on a call yesterday where this company told us about their
service, which is delivered as one of these 'embedded' applications.  this
thing would have its own navigation and display of content on our site in
order to keep folks clicking.

if you ask me, that just feels weird; having some other company like own a
piece of your app...  however, it would be foolish not to admit that this is
the way things are trending and that there will only be more of it to come.

-nathan


Re: [PHP] PHP/Ajax Framework - Call for Developers Testers

2009-08-20 Thread Raymond Irving
Hi Nathan,

I agree with you, and I believe that there are many persons who don't like the 
idea of hosting all their applications on a third party server. IMO there are 
some advantages and disadvantages to doing so but that's a discussion in itself.

The good thing about Raxan's Embeddable Apps is that you have control over the 
source code.  With the ShoutBox example you can download the framwork along 
with the application and copy it to your own servers. No need to host the apps 
on third party servers.

Some benefits of Raxan Embeddable Apps:

1. Works in just about any web page 
2. Easy to deploy and configure
3. Reusable and Shareable

I believe that one day we will see apps like Photo Galleries, Media players, 
File Managers, Catalogs, etc that users can easily download and add to the 
their web pages.

PS. I would like to invite everyone to download the framework, try the examples 
and take a look at the source code. You will be amaze at what you can do with 
Raxan PDI. - You can download it here: 
http://code.google.com/p/raxan/downloads/detail?name=raxan-pdi.1.0.0b2.zipcan=2q=


Best regards
__
Raymond Irving



--- On Thu, 8/20/09, Nathan Nobbe quickshif...@gmail.com wrote:

From: Nathan Nobbe quickshif...@gmail.com
Subject: Re: [PHP] PHP/Ajax Framework - Call for Developers  Testers
To: Raymond Irving xwis...@yahoo.com
Cc: php-general@lists.php.net
Date: Thursday, August 20, 2009, 1:31 PM

ive seen lots of third parties selling components in this manor.  now that ajax 
has hit the scene there are some really weird things going on.

i was just on a call yesterday where this company told us about their service, 
which is delivered as one of these 'embedded' applications.  this thing would 
have its own navigation and display of content on our site in order to keep 
folks clicking.

if you ask me, that just feels weird; having some other company like own a 
piece of your app...  however, it would be foolish not to admit that this is 
the way things are trending and that there will only be more of it to come.

-nathan


[PHP] PHP/Ajax Framework - Call for Developers Testers

2009-08-19 Thread Raymond Irving
Hello,

I've just released Raxan Beta 2 with lots for features for both PHP and Ajax 
developers.

I'm looking for persons to help me test and improve the framework. If you're 
interested, then please download the framework , join the community and share 
your thoughts and ideas. Feel free to send me an email if you have any 
questions.

You can check out the new features here:
http://raxanpdi.com/new-in-beta-2.html


Best regards
__
Raymond Irving


Re: [PHP] PHP/Ajax Framework - Call for Developers Testers

2009-08-19 Thread Raymond Irving
Hi Nathan,

Many thanks for the feedback. There many other useful features built into the 
API but my favorite is the embedded feature.

You can see a live example here:
http://raxanpdi.com/shoutbox-embedded-example.html

Best regards,
__
Raymond Irving


--- On Wed, 8/19/09, Nathan Nobbe quickshif...@gmail.com wrote:

From: Nathan Nobbe quickshif...@gmail.com
Subject: Re: [PHP] PHP/Ajax Framework - Call for Developers  Testers
To: Raymond Irving xwis...@yahoo.com
Cc: php-general@lists.php.net
Date: Wednesday, August 19, 2009, 11:56 AM

On Wed, Aug 19, 2009 at 7:06 AM, Raymond Irving xwis...@yahoo.com wrote:

 Hello,

 I've just released Raxan Beta 2 with lots for features for both PHP and
 Ajax developers.

 I'm looking for persons to help me test and improve the framework. If
 you're interested, then please download the framework , join the community
 and share your thoughts and ideas. Feel free to send me an email if you have
 any questions.

 You can check out the new features here:
 http://raxanpdi.com/new-in-beta-2.html


you have a neat feature list here Raymond, thanks for sharing.

-nathan


Re: [PHP] php, ajax and international application

2008-04-22 Thread Robert Cummings

On Tue, 2008-04-22 at 07:55 +0200, Alain Roger wrote:
 Hi,
 
 Till now, i'm used to have a php file (for each language) to store all text
 labels for my international application.
 i tried with Ajax to improve it but it seems not so flexible at it promised.
 my purpose was to limit the transfer data and especially to not load too
 much the server with not important calculation as localization of
 application.
 
 therefore, i would like to know what do you do to have an international
 application ?
 1. do you use JSON : 1 javascript file for each language and for each
 module. Code is not secured and everybody can read it.

Usually you use one language JavaScript file for each language. And
the JavaScript code itself is language neutral.

 2. do you use PHP like i wrote above.

PHP would also use the language file. You could put all your language
stuff in a PHP file and have a script that can convert it to a
JavaScript loadable file. That way your maintenance occurs in one
location, but you can benefit from having the JS pre-created.

 3. you use another method
 
 I would be glad to here from you the pros and cons of your experiences.

I've not done a lot with JavaScript and multilingualism. At least not in
a way that was overly important. With respect to content, I do use
separate content files. My InterJinn framework when it builds the pages
from the templates will grab template lang/X and fall back on template X
if the language specific version doesn't exist. This is automatic when
multilingual is enabled for a project. Then it's just a case of having
language strings defined for stuff like forms and error messages. here's
a site I recently launched:

http://www.expertpanel.ca

The mapping of links to language specific content is all done at compile
time. The only run-time feature of the site is the random banner image
at the top and any forms. If *I* was to have a need for JavaScript like
you mention, I would build the language files from a PHP master file
automatically when building the site.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] php, ajax and international application

2008-04-21 Thread Alain Roger
Hi,

Till now, i'm used to have a php file (for each language) to store all text
labels for my international application.
i tried with Ajax to improve it but it seems not so flexible at it promised.
my purpose was to limit the transfer data and especially to not load too
much the server with not important calculation as localization of
application.

therefore, i would like to know what do you do to have an international
application ?
1. do you use JSON : 1 javascript file for each language and for each
module. Code is not secured and everybody can read it.
2. do you use PHP like i wrote above.
3. you use another method

I would be glad to here from you the pros and cons of your experiences.

thx.

-- 
Alain

Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008


Re: [PHP] PHP Ajax progress bar

2008-03-13 Thread tedd

At 11:24 AM +0800 3/12/08, Shelley wrote:

Hi all,

I'm searching some file upload progress bar code.
But no good result was found. :(
So is there anybody please be kind enough to show some code here?

Great thanks.

--
Regard,
Shelley (http://phparch.cn)


Shelley:

Here's my solution:

http://webbytedd.com/bb/wait/

However, if you want php to communicate with ajax, then that can be 
done like so:


http://webbytedd.com/b/timed-php/

But, you will need to figure out how much of a file has been uploaded 
at each interval and I don't know how to do that.


However, if it's a batch of files, then that certainly could be done 
between each file.


Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Ajax progress bar

2008-03-12 Thread Thijs Lensselink

Quoting Shelley [EMAIL PROTECTED]:


Hi all,

I'm searching some file upload progress bar code.
But no good result was found. :(
So is there anybody please be kind enough to show some code here?

Great thanks.

--
Regard,
Shelley (http://phparch.cn)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


You can try searching the archives. Rasmus had an example a long time ago.
Although it requires APC to be installed. Maybe it's interesting.

Found it:
Example : http://progphp.com/upload.php
Source : http://progphp.com/upload.phps

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP Ajax progress bar

2008-03-12 Thread Mr Webber
I haven't' tried this yet ... so I would appreciate your feedback.

-Original Message-
From: Thijs Lensselink [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 12, 2008 4:28 AM
To: php-general@lists.php.net
Subject: Re: [PHP] PHP  Ajax progress bar

Quoting Shelley [EMAIL PROTECTED]:

 Hi all,

 I'm searching some file upload progress bar code.
 But no good result was found. :(
 So is there anybody please be kind enough to show some code here?

 Great thanks.

 --
 Regard,
 Shelley (http://phparch.cn)

 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

You can try searching the archives. Rasmus had an example a long time ago.
Although it requires APC to be installed. Maybe it's interesting.

Found it:
Example : http://progphp.com/upload.php
Source : http://progphp.com/upload.phps

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] PHP Ajax progress bar

2008-03-12 Thread Thijs Lensselink

Quoting Mr Webber [EMAIL PROTECTED]:


I haven't' tried this yet ... so I would appreciate your feedback.

-Original Message-
From: Thijs Lensselink [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2008 4:28 AM
To: php-general@lists.php.net
Subject: Re: [PHP] PHP  Ajax progress bar

Quoting Shelley [EMAIL PROTECTED]:


Hi all,

I'm searching some file upload progress bar code.
But no good result was found. :(
So is there anybody please be kind enough to show some code here?

Great thanks.

--
Regard,
Shelley (http://phparch.cn)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


You can try searching the archives. Rasmus had an example a long time ago.
Although it requires APC to be installed. Maybe it's interesting.

Found it:
Example : http://progphp.com/upload.php
Source : http://progphp.com/upload.phps

--


Pls don't top post.

If you want to know if it works. Go ahead!
Copy paste the code and give it a try.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Ajax progress bar

2008-03-12 Thread Shelley

Thijs Lensselink 写道:

Quoting Mr Webber [EMAIL PROTECTED]:


I haven't' tried this yet ... so I would appreciate your feedback.

-Original Message-
From: Thijs Lensselink [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2008 4:28 AM
To: php-general@lists.php.net
Subject: Re: [PHP] PHP  Ajax progress bar

Quoting Shelley [EMAIL PROTECTED]:


Hi all,

I'm searching some file upload progress bar code.
But no good result was found. :(
So is there anybody please be kind enough to show some code here?

Great thanks.

--
Regard,
Shelley (http://phparch.cn)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


You can try searching the archives. Rasmus had an example a long time 
ago.

Although it requires APC to be installed. Maybe it's interesting.

Found it:
Example : http://progphp.com/upload.php
Source : http://progphp.com/upload.phps

--


Pls don't top post.

If you want to know if it works. Go ahead!
Copy paste the code and give it a try.



I don't think it works.

I tried.
The screen always said 0%, 0 of 0 byte until the file is uploaded.
Is that what you mean progress bar?

--
Regards,
Shelley (http://phparch.cn)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Ajax progress bar

2008-03-12 Thread Thijs Lensselink

Quoting Shelley [EMAIL PROTECTED]:


Thijs Lensselink 写道:

Quoting Mr Webber [EMAIL PROTECTED]:


I haven't' tried this yet ... so I would appreciate your feedback.

-Original Message-
From: Thijs Lensselink [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2008 4:28 AM
To: php-general@lists.php.net
Subject: Re: [PHP] PHP  Ajax progress bar

Quoting Shelley [EMAIL PROTECTED]:


Hi all,

I'm searching some file upload progress bar code.
But no good result was found. :(
So is there anybody please be kind enough to show some code here?

Great thanks.

--
Regard,
Shelley (http://phparch.cn)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


You can try searching the archives. Rasmus had an example a long time ago.
Although it requires APC to be installed. Maybe it's interesting.

Found it:
Example : http://progphp.com/upload.php
Source : http://progphp.com/upload.phps

--


Pls don't top post.

If you want to know if it works. Go ahead!
Copy paste the code and give it a try.



I don't think it works.

I tried.
The screen always said 0%, 0 of 0 byte until the file is uploaded.
Is that what you mean progress bar?

--
Regards,
Shelley (http://phparch.cn)



Do you have all the yui files? and APC enabled?
I tried it some time ago and it worked. But i did  have to set

apc.rfc1867 = on

in php.ini to make it work. Forgot to mention that one.




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Ajax progress bar

2008-03-12 Thread Philip Thompson

On Mar 12, 2008, at 5:02 AM, Thijs Lensselink wrote:


Thijs Lensselink 写道:


How do you pronounce your name?


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Ajax progress bar

2008-03-12 Thread Thijs Lensselink

Quoting Philip Thompson [EMAIL PROTECTED]:


On Mar 12, 2008, at 5:02 AM, Thijs Lensselink wrote:


Thijs Lensselink 写道:


How do you pronounce your name?


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Well.. how to explain this one...

thijs : T + [ice]

That's the best i can do :)


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Ajax progress bar

2008-03-12 Thread Philip Thompson

On Mar 12, 2008, at 9:52 AM, Thijs Lensselink wrote:


Quoting Philip Thompson [EMAIL PROTECTED]:


On Mar 12, 2008, at 5:02 AM, Thijs Lensselink wrote:


Thijs Lensselink 写道:


How do you pronounce your name?


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Well.. how to explain this one...

thijs : T + [ice]

That's the best i can do :)



Which is different than the famous rapper/actor...

hijs-t : [ice] + T

Hehehe =D
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Ajax progress bar

2008-03-12 Thread Daniel Brown
On Wed, Mar 12, 2008 at 11:03 AM, Philip Thompson
[EMAIL PROTECTED] wrote:
 On Mar 12, 2008, at 9:52 AM, Thijs Lensselink wrote:
   Quoting Philip Thompson [EMAIL PROTECTED]:
  
   How do you pronounce your name?
  
   Well.. how to explain this one...
  
   thijs : T + [ice]
  

  Which is different than the famous rapper/actor...

  hijs-t : [ice] + T


HA!

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Ajax progress bar

2008-03-12 Thread Thijs Lensselink

Quoting Daniel Brown [EMAIL PROTECTED]:


On Wed, Mar 12, 2008 at 11:03 AM, Philip Thompson
[EMAIL PROTECTED] wrote:

On Mar 12, 2008, at 9:52 AM, Thijs Lensselink wrote:
  Quoting Philip Thompson [EMAIL PROTECTED]:
 
  How do you pronounce your name?
 
  Well.. how to explain this one...
 
  thijs : T + [ice]
 

 Which is different than the famous rapper/actor...

 hijs-t : [ice] + T



HA!

--
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?



Same reaction here!



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Ajax progress bar

2008-03-12 Thread Sn!per
Quoting Shelley [EMAIL PROTECTED]:

 I don't think it works.
 
 I tried.
 The screen always said 0%, 0 of 0 byte until the file is uploaded.
 Is that what you mean progress bar?
 
 --
 Regards,
 Shelley (http://phparch.cn)

It work fine. And that's what we meant by progress bar.

--
Roger


---
Sign Up for free Email at http://ureg.home.net.my/
---

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP Ajax progress bar

2008-03-11 Thread Shelley

Hi all,

I'm searching some file upload progress bar code.
But no good result was found. :(
So is there anybody please be kind enough to show some code here?

Great thanks.

--
Regard,
Shelley (http://phparch.cn)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Ajax progress bar

2008-03-11 Thread Wolf

Shelley,

What code have you tried and what were your results?

What about searches on google or the archives here?

Wolf


Shelley wrote:

Hi all,

I'm searching some file upload progress bar code.
But no good result was found. :(
So is there anybody please be kind enough to show some code here?

Great thanks.

--
Regard,
Shelley (http://phparch.cn)




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Ajax progress bar

2008-03-11 Thread Wolf
As a qualified PHP Engineer , I'm certain you have written some code 
that is failing and you need a little help massaging, by all means post 
it and we'll gladly take a look and see if we can help facilitate its use.


Wolf

Shelley wrote:

Hi all,

I'm searching some file upload progress bar code.
But no good result was found. :(
So is there anybody please be kind enough to show some code here?

Great thanks.

--
Regard,
Shelley (http://phparch.cn)




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP: Ajax send()

2008-02-22 Thread germana
Hi!!

Im trying to sent data to and php with Ajax, so..
this is what im sending_url= table='historia'$'='$''$'string'$'';

then i do:

_url = _url.substring(0,_url.length-1)  //quita el  de sobra al final
var ajax = nuevoAjax();
ajax.open(POST, atrapalo_x.php, true);
ajax.setRequestHeader(Content-Type,
aplication/x-www-form-urlencoded);
ajax.send(_url);

ajax.onreadystatechange = function()
{
if(ajax.readyState == 4)
{
alert(ajax.responseText)
.
.
.
..

and in the php i do:

$datafield=explode($,str_replace(\',',$_POST[table]));
$main_table=.str_replace(',,$datafield[0]).;
$main_table=strtolower($main_table);

but when i do and echo $datafield[0] or echo $main_table

it returns  nothing... just blank




Re: [PHP] PHP: Ajax send()

2008-02-22 Thread Zoltán Németh
2008. 02. 22, péntek keltezéssel 12.03-kor germana ezt írta:
 Hi!!
 
 Im trying to sent data to and php with Ajax, so..
 this is what im sending_url= table='historia'$'='$''$'string'$'';
 
 then i do:
 
 _url = _url.substring(0,_url.length-1)  //quita el  de sobra al final
 var ajax = nuevoAjax();
   ajax.open(POST, atrapalo_x.php, true);
   ajax.setRequestHeader(Content-Type,
 aplication/x-www-form-urlencoded);
   ajax.send(_url);
   
   ajax.onreadystatechange = function()
   {
   if(ajax.readyState == 4)
   {
   alert(ajax.responseText)
 .
 .
 .
 ..
 
 and in the php i do:
 
 $datafield=explode($,str_replace(\',',$_POST[table]));
 $main_table=.str_replace(',,$datafield[0]).;
 $main_table=strtolower($main_table);
 
 but when i do and echo $datafield[0] or echo $main_table
 
 it returns  nothing... just blank
 

and if you var_dump($_POST) what does it show?

greets
Zoltán Németh

 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP: Ajax send()

2008-02-22 Thread Zoltán Németh
please reply to the list also...

2008. 02. 22, péntek keltezéssel 15.25-kor germana ezt írta:
 nuevoAjax() is the name of the ajax object :P  in spanish

OK, but that does not tell me anything about what kind of ajax library
you're using... anyway, maybe it's better to ask on an ajax list because
this is clearly not a php problem

greets
Zoltán Németh

 
 On Fri, 2008-02-22 at 20:54 +0100, Zoltán Németh wrote: 
  2008. 02. 22, péntek keltezéssel 14.32-kor germana ezt írta:
   So... i was checking my localhost with wireshark (a sniffer) and i
   found that the DATA is send after the POST ¿¿¿ i dont understand
   why the data is not send completly.
  
  the problem must be in your ajax library... I don't know what kind of
  ajax scripts you use, I've never seen 'nuevoAjax' before, but its
  clearly a problem with your javascript, not php. correctly sent requests
  contain the post data, so $_POST is not empty if you send anything
  
  greets
  Zoltán Németh
  
   
   
   
   if i do var_dump($_POST) is: array(0){}
   
   On Fri, 2008-02-22 at 17:41 +0100, Zoltán Németh wrote: 
2008. 02. 22, péntek keltezéssel 12.03-kor germana ezt írta:
 Hi!!
 
 Im trying to sent data to and php with Ajax, so..
 this is what im sending_url= table='historia'$'='$''$'string'$'';
 
 then i do:
 
 _url = _url.substring(0,_url.length-1)  //quita el  de sobra al final
 var ajax = nuevoAjax();
   ajax.open(POST, atrapalo_x.php, true);
   ajax.setRequestHeader(Content-Type,
 aplication/x-www-form-urlencoded);
   ajax.send(_url);
   
   ajax.onreadystatechange = function()
   {
   if(ajax.readyState == 4)
   {
   alert(ajax.responseText)
 .
 .
 .
 ..
 
 and in the php i do:
 
 $datafield=explode($,str_replace(\',',$_POST[table]));
 $main_table=.str_replace(',,$datafield[0]).;
 $main_table=strtolower($main_table);
 
 but when i do and echo $datafield[0] or echo $main_table
 
 it returns  nothing... just blank
 

and if you var_dump($_POST) what does it show?

greets
Zoltán Németh

 

  

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP: Ajax send()

2008-02-22 Thread Zoltán Németh
2008. 02. 22, péntek keltezéssel 14.32-kor germana ezt írta:
 So... i was checking my localhost with wireshark (a sniffer) and i
 found that the DATA is send after the POST ¿¿¿ i dont understand
 why the data is not send completly.

the problem must be in your ajax library... I don't know what kind of
ajax scripts you use, I've never seen 'nuevoAjax' before, but its
clearly a problem with your javascript, not php. correctly sent requests
contain the post data, so $_POST is not empty if you send anything

greets
Zoltán Németh

 
 
 
 if i do var_dump($_POST) is: array(0){}
 
 On Fri, 2008-02-22 at 17:41 +0100, Zoltán Németh wrote: 
  2008. 02. 22, péntek keltezéssel 12.03-kor germana ezt írta:
   Hi!!
   
   Im trying to sent data to and php with Ajax, so..
   this is what im sending_url= table='historia'$'='$''$'string'$'';
   
   then i do:
   
   _url = _url.substring(0,_url.length-1)  //quita el  de sobra al final
   var ajax = nuevoAjax();
 ajax.open(POST, atrapalo_x.php, true);
 ajax.setRequestHeader(Content-Type,
   aplication/x-www-form-urlencoded);
 ajax.send(_url);
 
 ajax.onreadystatechange = function()
 {
 if(ajax.readyState == 4)
 {
 alert(ajax.responseText)
   .
   .
   .
   ..
   
   and in the php i do:
   
   $datafield=explode($,str_replace(\',',$_POST[table]));
   $main_table=.str_replace(',,$datafield[0]).;
   $main_table=strtolower($main_table);
   
   but when i do and echo $datafield[0] or echo $main_table
   
   it returns  nothing... just blank
   
  
  and if you var_dump($_POST) what does it show?
  
  greets
  Zoltán Németh
  
   
  

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP/AJAX File DragDrop

2007-11-30 Thread Stephen Edberg
On Sat, 1 Dec 2007, Andrei Verovski (aka MacGuru) wrote:

 Hi !

 Anyone knows PHP/AJAX library which allows to get full path of file dropped
 into web browser's window area?

 It is required for document archiving system in order to avoid multiple (or to
 be more precise, almost endless) usage of open file dialogs from the
 browser.

 Library should be compatible with Firefox (Lin, Win, Mac), IE and Safary.


 Thanks in advance for any suggestion(s).

 Andrei



As others have noted, Javascript cannot return the full path to a
client-side document for security reasons. If you need a multiple file
upload interface, you might want to take a look at some extjs ALAX
toolkit-based stuff, eg

http://aariadne.com/uploadform/
http://extplorer.sourceforge.net/

Haven't used either of them, though. I do use extjs alot:

http://extjs.com/

Normally I shy away from 'Web 2.0' kinda stuff, but I've had to develop
some complex dynamic interfaces to a PHP/MySQL backend and had to make the
leap. It's well-documented, the developers are active and helpful
participants in the forums, and it seems to work pretty well
cross-platform (haven't tried it on my Linux/Solaris boxes yet, but
WinXP/Firefox, WinXP/IE, OSX/Firefox, OSX/Safari all seem to work pretty
well. Had some quirks with OSX/Opera, but haven't had a chance to delve
into that.

I also use the HTML_AJAX package -

http://pear.php.net/package/HTML_AJAX

- as I still have some PHP4 left and can't use the native JSON functions.

If extjs doesn't float your boat, you can always look into Scriptaculous,
Dojo, YUI, many others.

steve

...
. Steve Edberg   [EMAIL PROTECTED] .
. Computer Consultant University of California, Davis .
.   (530)754-9127 .
...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP/AJAX File DragDrop

2007-11-30 Thread Andrei Verovski (aka MacGuru)
Hi !

Anyone knows PHP/AJAX library which allows to get full path of file dropped 
into web browser's window area?

It is required for document archiving system in order to avoid multiple (or to 
be more precise, almost endless) usage of open file dialogs from the 
browser.

Library should be compatible with Firefox (Lin, Win, Mac), IE and Safary.


Thanks in advance for any suggestion(s).

Andrei

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php/ajax question

2007-01-02 Thread Richard Lynch

Mixing Location and Cookie headers has always been hit and miss...

I think you could fix it with session_write_close() or you could just
replace the Location: with:
require 'b.php';
since you are just wasting HTTP connections the way you have it now...


On Sat, December 30, 2006 12:56 pm, tedd wrote:
 Hi gang:

 I have a small php script that behaves differently depending upon
 who's calling it. The code is:

 ?php session_start();   /* a.php  */
 ob_start();
 $_SESSION['var'] = test;
 ob_clean();
 header(Location: http://www.example.com/b.php;); /* Redirect browser
 */
 exit;  ?

 If the code is called directly, namely http://www.example.com/a.php,
 then the $_SESSION var is filled with text and the redirect is
 realized.

 However, if the php script is called via ajax:

 -snip- preceding ajax

 function sndReq(action)
 {
 http.open('get', 'a.php');
 http.send(null);
 }

 Then the $_SESSION var is filled with test, but the redirect is not
 realized.

 Why can't the php script redirect the browser when called via ajax ?

 Thanks.

 tedd

 --
 ---
 http://sperling.com  http://ancientstones.com  http://earthstones.com

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] php/ajax question

2006-12-30 Thread tedd

Hi gang:

I have a small php script that behaves differently depending upon 
who's calling it. The code is:


?php session_start();   /* a.php  */
ob_start();
$_SESSION['var'] = test;
ob_clean();
header(Location: http://www.example.com/b.php;); /* Redirect browser */
exit;?

If the code is called directly, namely http://www.example.com/a.php, 
then the $_SESSION var is filled with text and the redirect is 
realized.


However, if the php script is called via ajax:

-snip- preceding ajax

function sndReq(action)
{
http.open('get', 'a.php');
http.send(null);
}

Then the $_SESSION var is filled with test, but the redirect is not realized.

Why can't the php script redirect the browser when called via ajax ?

Thanks.

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php/ajax question

2006-12-30 Thread Mark Kelly
On Saturday 30 December 2006 18:56, tedd wrote:
 Why can't the php script redirect the browser when called via ajax ?

The browser will not be expecting a page back, and will ignore headers. 
Just some quick suggestion code, this isn't tested (except createRequest - 
I use that all the time)...

function createRequest() {
try {
request = new XMLHttpRequest();
} catch (trymicrosoft) {
try {
request = new ActiveXObject(Msxml2.XMLHTTP);
} catch (othermicrosoft) {
try {
request = new ActiveXObject(Microsoft.XMLHTTP);
} catch (failed) {
request = null;
}
}
}
if (request == null) alert(Error creating request object!);
   }

function sndReq(action) {
createRequest();
var url = a.php?action= + Volume + dummy= + new Date().getTime(); 
// random shit at the end is hack to get round browser response cacheing
request.open(GET,url);
request.onreadystatechange = updateReq;
request.send(null);
}

function updateReq() {
if (request.readyState == 4) {
var newLocation = request.responseText;
window.location = newLocation;
}
}

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php/ajax question

2006-12-30 Thread Paul Novitski

At 12/30/2006 10:56 AM, tedd wrote:

Why can't the php script redirect the browser when called via ajax ?



Ajax is giving PHP control over just that byte-stream that ajax is 
receiving and perhaps inserting into the page, not the full page itself.


Say you use javascript to set the src of an img to a PHP 
script.  When the request is made, PHP redirects to another 
resource.  This will affect only the image object in question, not 
the HTML page in which the image exists.


Regards,
Paul 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php/ajax question

2006-12-30 Thread tedd

At 12:55 PM -0800 12/30/06, Paul Novitski wrote:

At 12/30/2006 10:56 AM, tedd wrote:

Why can't the php script redirect the browser when called via ajax ?



Ajax is giving PHP control over just that byte-stream that ajax is 
receiving and perhaps inserting into the page, not the full page 
itself.


Say you use javascript to set the src of an img to a PHP script. 
When the request is made, PHP redirects to another resource.  This 
will affect only the image object in question, not the HTML page in 
which the image exists.


Regards,
Paul



Pul:

I'm not sure why, but this is making sense.  :-)

I suspected something like that was going on in the background.

Thanks,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php/ajax question

2006-12-30 Thread Mark Kelly
On Saturday 30 December 2006 18:56, tedd wrote:
 Why can't the php script redirect the browser when called via ajax ?

The browser will not be expecting a page back, and will ignore headers. The 
response must be handled by a function you define.

For the sake of a quick demo, if your php accepts an action via GET and 
simply prints the location for the redirect, you can do it at the client 
end. 

// example code

function createRequest() {
try {
request = new XMLHttpRequest();
} catch (trymicrosoft) {
try {
request = new ActiveXObject(Msxml2.XMLHTTP);
} catch (othermicrosoft) {
try {
request = new ActiveXObject(Microsoft.XMLHTTP);
} catch (failed) {
request = null;
}
}
}
if (request == null) alert(Error creating request object!);
   }

function sndReq(action) {
createRequest();
var url = a.php?action= + action + dummy= + new Date().getTime(); 
// random stuff at the end is hack to get round browser response 
cacheing
request.open(GET,url);
request.onreadystatechange = updateReq;
request.send(null);
}

function updateReq() {
if (request.readyState == 4) {
var newLocation = request.responseText;
window.location = newLocation;
}
}

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] php/ajax..

2006-08-07 Thread bruce
hi..

will php allow a user to enter field on a form, and compute aresult based on
the field, without having to reload the entire form, or will i need ajax...

any good examples on how to accomplish this..

thanks

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] php/ajax..

2006-08-07 Thread Jay Blanchard
[snip]
will php allow a user to enter field on a form, and compute aresult
based on
the field, without having to reload the entire form, or will i need
ajax...
[/snip]

You will only need JavaScript.

Remember, JavaScript is client-side, PHP is server-side.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php/ajax..

2006-08-07 Thread Robert Cummings
On Mon, 2006-08-07 at 12:11 -0700, bruce wrote:
 hi..
 
 will php allow a user to enter field on a form, and compute aresult based on
 the field, without having to reload the entire form, or will i need ajax...
 
 any good examples on how to accomplish this..

You have 150 posts since February 5th 2005, are you pulling our leg? or
are you missing a few neurons?

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php/ajax..

2006-08-07 Thread Mariano Guadagnini

bruce wrote:

hi..

will php allow a user to enter field on a form, and compute aresult based on
the field, without having to reload the entire form, or will i need ajax...

any good examples on how to accomplish this..

thanks

  


PHP is executed on the server, so you cannot campute something without 
sending it back, reprocessing the form and put the result on the client 
browser's. Some basic tasks can be done in the client with javascript, 
but you have no much choices to accomplish what you want:
1)Ajax (change or reload a section or node of your document based on an 
action)

2)Frames and Javascript (reload only a frame with javascript, for example)


There are many good examples out there of either ways.

Regards,

Mariano.


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.10.7/410 - Release Date: 05/08/2006

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] php/ajax..

2006-08-07 Thread Peter Lauri
Robert, have you studied Neuron Networks?

-Original Message-
From: Robert Cummings [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 08, 2006 2:16 AM
To: [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Subject: Re: [PHP] php/ajax..

On Mon, 2006-08-07 at 12:11 -0700, bruce wrote:
 hi..
 
 will php allow a user to enter field on a form, and compute aresult based
on
 the field, without having to reload the entire form, or will i need
ajax...
 
 any good examples on how to accomplish this..

You have 150 posts since February 5th 2005, are you pulling our leg? or
are you missing a few neurons?

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] php/ajax..

2006-08-07 Thread Robert Cummings
On Mon, 2006-08-07 at 21:15 +0700, Peter Lauri wrote:
 Robert, have you studied Neuron Networks?

I've touched on them. Though I'm sure we both know to which kind of
neuron I was referring :)

Cheers,
Rob.


 
 -Original Message-
 From: Robert Cummings [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, August 08, 2006 2:16 AM
 To: [EMAIL PROTECTED]
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] php/ajax..
 
 On Mon, 2006-08-07 at 12:11 -0700, bruce wrote:
  hi..
  
  will php allow a user to enter field on a form, and compute aresult based
 on
  the field, without having to reload the entire form, or will i need
 ajax...
  
  any good examples on how to accomplish this..
 
 You have 150 posts since February 5th 2005, are you pulling our leg? or
 are you missing a few neurons?
 

-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP AJAX Framework - Suggestions Please

2006-04-03 Thread [EMAIL PROTECTED]

Hi,

Anyone can suggest me which PHP AJAX framework you are using, for what
reason(s), what are pros and cons of your particular choice.

I found many, and now facing difficult choice.

BTW, how do you pass session id between calls to PHP from JavaScript  
(cookies

or explicit foo.php?PHPSESSSIONID=blahblahblah)?

Thanks in advance for any suggestion(s).

Andrei


PS. Posted this question before, but got only one suggestion so far  
from Greg Beaver (PEAR_HTMP_AJAX). Would be very pleased to get an  
insight for more alternatives, like AJASON, for example.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP AJAX Framework - Suggestions Please

2006-04-01 Thread Andrei Verovski (aka MacGuru)
Hi,

Anyone can suggest me which PHP AJAX framework you are using, for what 
reason(s), what are pros and cons of your particular choice.

I found many, and now facing difficult choice.

BTW, how do you pass session id between calls to PHP from JavaScript (cookies 
or explicit foo.php?PHPSESSSIONID=blahblahblah)?

Thanks in advance for any suggestion(s).

Andrei

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP AJAX

2006-03-17 Thread Jay Blanchard
Anyone know of a good AJAX mailing list? TIA

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php+ ajax

2006-02-21 Thread Kim Christensen
On 2/20/06, David Dorward [EMAIL PROTECTED] wrote:
 Element ids may not contain square brackets in HTML documents.

Get your facts straight, David. Square brackets works fine in HTML
documents as long as you escape the ID when you need to reference them
by JS.

--
Kim Christensen
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php+ ajax

2006-02-21 Thread Jochem Maas

Kim Christensen wrote:

On 2/20/06, David Dorward [EMAIL PROTECTED] wrote:


Element ids may not contain square brackets in HTML documents.



Get your facts straight, David. Square brackets works fine in HTML


David has his facts straight, just because something works (for you)
doesn't make it correct (MARQUEE tag anyone?):

quote from=http://www.w3.org/TR/html4/types.html#type-name;
ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed
by any number of letters, digits ([0-9]), hyphens (-), underscores (_),
colons (:), and periods (.).
/quote

what I do usually is misuse the square brackets in the name - to get
the arrays in php - and use a different string for the id (one that is
technically) valid for use in javascript.

Kim do the escaped sqaure brackets work in all majors browsers as
far as you know?


documents as long as you escape the ID when you need to reference them
by JS.

--
Kim Christensen
[EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php+ ajax

2006-02-21 Thread Kim Christensen
On 2/21/06, Jochem Maas [EMAIL PROTECTED] wrote:
 Kim do the escaped sqaure brackets work in all majors browsers as
 far as you know?

Major browsers as in Firefox and IE for PC/Mac works great, yes -
haven't had the chance to try Opera or Konqueror yet, maybe someone
could shed a light on this?

Sorry for being rude, David - had a bad morning!

--
Kim Christensen
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php+ ajax

2006-02-21 Thread David Dorward
--- Kim Christensen [EMAIL PROTECTED] wrote:

 On 2/21/06, Jochem Maas [EMAIL PROTECTED]
 wrote:

 Kim do the escaped sqaure brackets work in
 all majors browsers as far as you know?

 Major browsers as in Firefox and IE for PC/Mac
 works great, yes -

Many browsers are amazing at being able to compensate
by errors made by authors, but that shouldn't be taken
as an excuse to not treat the errors as anything other
than something that should be fixed.

You can't test in every browser out there - there are
too many. You can't test in any browser that hasn't be
written yet.

Writing code that ignores the standards is just asking
for maintainance headaches and other troubles down the
line.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php+ ajax

2006-02-21 Thread tedd

You can't test in every browser out there - there are
too many. You can't test in any browser that hasn't be
written yet.

Writing code that ignores the standards is just asking
for maintainance headaches and other troubles down the
line.


I have to agree with David on this -- but, future browser's 
compliance to standards with is certainly not guaranteed. M$ is still 
reluctant to comply even today (i.e., Does IE 7 show IDNS correctly?).


However, we have no other direction to lessen maintenance headaches 
other than comply.


tedd
--

http://sperling.com   php code: http://www.weberdev.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php+ ajax

2006-02-21 Thread David Dorward
--- tedd [EMAIL PROTECTED] wrote:
 I have to agree with David on this -- but, future
 browser's compliance to standards with is certainly 
 not guaranteed.

I find it less trouble to code to standards and then
deal with bugs in browsers, then to code to bugs in
browsers and then deal with more bugs in browsers PLUS
browsers rejecting the code on the basis of it not
meeting the standard. :)

-- 
David Dorward
http://dorward.me.uk/

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] php+ ajax

2006-02-20 Thread blackwater dev
Hello,

I am trying to do a pre-search to let the users know how many rows
will be returned before they actually hit submit.  I think this is
more of a js question but :

I have this js function:

function preSearch() {
//Put the form data into a variable
var min_price= document.getElementById('min_price').value  ;
var max_price= document.getElementById('max_price').value  ;
document.getElementById('prop_num').innerHTML = Searching...;

   var url = 'ajax.php?min_price=' + min_price +'max_price=' + max_price;
xmlhttp.open('GET',   url, true);
xmlhttp.onreadystatechange = function() {
if(xmlhttp.readyState == 4  xmlhttp.status == 200) {
 document.getElementById('prop_num').innerHTML ='TotalRecords:
' + xmlhttp.responseText + ' ';
} else {
//If the PHP script fails to send a
response, or sends back an error, display a simple user-friendly
notification
   
document.getElementById('prop_num').innerHTML = '';
}
};
xmlhttp.send(null);
   // }
}

And have this for inputs:

input name=min_price id=min_price etc.

I would really like to have all of my inputs has part of an arry so:

input name=search[min_price] id=search[min_price] etc

The problem is js seems to get confused trying to look this up by id
and I don't think I can use an array like this with a GET, how can I
use arrays for all this??

Thanks!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php+ ajax

2006-02-20 Thread Kim Christensen
On 2/20/06, blackwater dev [EMAIL PROTECTED] wrote:
 The problem is js seems to get confused trying to look this up by id
 and I don't think I can use an array like this with a GET, how can I
 use arrays for all this??

You have to escape the brackets with backslashes, so that the JS
really interprets it as an element ID - not an array. Something like
this might work:

[snip]
(HTML)
input name=search[min_price] id=search[min_price]

(JS)
var min_price= document.getElementById('search\[min_price\]').value  ;
[/snip]

--
Kim Christensen
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php+ ajax

2006-02-20 Thread David Dorward
Kim Christensen wrote:

 On 2/20/06, blackwater dev [EMAIL PROTECTED] wrote:
 The problem is js seems to get confused trying to look this up by id
 and I don't think I can use an array like this with a GET, how can I
 use arrays for all this??
 
 You have to escape the brackets with backslashes, so that the JS
 really interprets it as an element ID 

Element ids may not contain square brackets in HTML documents. 



-- 
David Dorward   http://blog.dorward.me.uk/   http://dorward.me.uk/
 Home is where the ~/.bashrc is

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] php ajax

2006-02-15 Thread pete

ello all, Im a beginner at php. but I was able to get this script to work.

Now I am looking to have it automatically refresh itself using ajax 
every 10 seconds.


Can somebody explain or show me how to do this.

Thank you.

PHP Code:
| | |?php

$httpfile = 
file_get_contents('http://www.game-monitor.com/client/buddyList.php?uid=8654listid=0xml=1'); 





$doc = DOMDocument::loadXML($httpfile);



$myBuddyNodes = $doc-getElementsByTagName('buddy');



/not neccessary, but im using it

$nameStatusDoc = new DOMDocument('1.0', 'iso-8859-1');

$rootElement = $nameStatusDoc-createElement('PetesList');

$rootElement = $nameStatusDoc-appendChild($rootElement);

/



echo table border = '0' cellpadding= '2' 
bgcolor='#616042'\ntheadtrth/thth/thtr/thead\n;


foreach ($myBuddyNodes as $node)

{

   echo tr;

   echo tdfont 
size='-1'.$node-firstChild-nextSibling-nodeValue./font/td;


   if($node-firstChild-nextSibling-nextSibling-nextSibling-nodeValue 
== Online) |


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php ajax

2006-02-15 Thread Jason Gerfen

pete wrote:

ello all, Im a beginner at php. but I was able to get this script to 
work.


Now I am looking to have it automatically refresh itself using ajax 
every 10 seconds.


Can somebody explain or show me how to do this.

Thank you.

PHP Code:
| | |


meta http-equiv=REFRESH content=10; URL=http://URL;
This is what you are looking for.  It is HTML, but it refreshes the page 
as needed.



?php

$httpfile = 
file_get_contents('http://www.game-monitor.com/client/buddyList.php?uid=8654listid=0xml=1'); 





$doc = DOMDocument::loadXML($httpfile);



$myBuddyNodes = $doc-getElementsByTagName('buddy');



/not neccessary, but im using it

$nameStatusDoc = new DOMDocument('1.0', 'iso-8859-1');

$rootElement = $nameStatusDoc-createElement('PetesList');

$rootElement = $nameStatusDoc-appendChild($rootElement);

/



echo table border = '0' cellpadding= '2' 
bgcolor='#616042'\ntheadtrth/thth/thtr/thead\n;


foreach ($myBuddyNodes as $node)

{

   echo tr;

   echo tdfont 
size='-1'.$node-firstChild-nextSibling-nodeValue./font/td;


   
if($node-firstChild-nextSibling-nextSibling-nextSibling-nodeValue 
== Online) |





--
Jason Gerfen

When asked what love is:
Love is the Jager talking.
~Craig Baldo

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php