php-general Digest 19 Jul 2012 16:18:35 -0000 Issue 7893

Topics (messages 318497 through 318504):

Re: Creating drop-down menus
        318497 by: James Newman
        318498 by: Paul M Foster
        318500 by: Andrew Ballard
        318501 by: Tim Streater

Re: SOAP and Php question about authentication
        318499 by: Matijn Woudt

Re: Creating drop-down menus - use AJAX and jQuery
        318502 by: Daevid Vincent
        318503 by: Jay Blanchard

difference PEAR PECL
        318504 by: Mihamina Rakotomandimby

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Just to put my 2cents in, you might want to try jQuery if you're going to
go down the AJAX road.

James.

On Wed, Jul 18, 2012 at 1:59 AM, Ramiro Barrantes <
ram...@precisionbioassay.com> wrote:

> Thanks to everyone for their help, AJAX is the way to go.
>
> Daevid, it's interesting you welcome me to the year 2000, I actually
> graduated from CS in 1999 and haven't really done much more than simple
> web-programming since (have done scientific programming instead), so I am
> definitely behind the times!!!
>
> ________________________________________
> From: Jen Rasmussen [j...@cetaceasound.com]
> Sent: Monday, July 16, 2012 4:19 PM
> To: Ramiro Barrantes; php-gene...@lists.php.net
> Subject: RE: [PHP] Creating drop-down menus
>
> -----Original Message-----
> From: Ramiro Barrantes [mailto:ram...@precisionbioassay.com]
> Sent: Monday, July 16, 2012 3:17 PM
> To: php-gene...@lists.php.net
> Subject: [PHP] Creating drop-down menus
>
> Hello,
>
> I am making an application using PHP/Javascript/mysql and had a question.
>
> Sometimes I need to use javascript to fill a drop down box based on the
> value of a previous drop down box.  However, the information to fill the
> latter is stored in mysql and can be a lot, what I have been doing is that,
> using PHP, I create hidden fields with all the possible information that
> might be needed to fill the second drop down.
>
> For example, the user chooses a bank from a drop down, and then a list of
> clients is displayed on the following drop down.  I use PHP to read all
> clients from all the banks and put that as hidden fields on the html page.
> It is very cumbersome.
>
> I do not want to read the database (which changes dynamically) from
> javascript directly due to confidentiality and because a lot of care has
> been taken to create the appropriate  queries with checks and protect
> misuse
> of the information using PHP.
>
> My questions are:
> 1) Do people just normally use hidden fields to store possible information
> to fill the drop downs?
> 2) any suggestions?
>
> Thanks in advance,
> Ramiro
>
> **
>
> You could also store the information as a session variable.
>
> Jen
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
On Wed, Jul 18, 2012 at 08:45:34AM +1200, James Newman wrote:

> Just to put my 2cents in, you might want to try jQuery if you're going to
> go down the AJAX road.

JQuery is a LOT of code to include if you're just going to do an AJAX
call or two. There are examples of doing straight AJAX with Javascript
on the 'Net. Once you work through them, you find that there's a
"static" part that you can include in all the files you want to make
AJAX calls. And then there's the part that deals directly with the data
you get back from whatever PHP or other script is feeding you data from
outside the website. That's the part that needs custom work. I *hate*
Javascript, but I managed to figure it out.

Another point: I'm not sure if it's the same for other people. I'm on a
crappy little computer running Linux. I've got a little CPU meter in my
taskbar. And nothing jacks that meter up like Javascript. I don't know
why, but Javascript just devours CPU on my computer. The more
javascript, the worse. And like I said, JQuery is a LOT of code. This is
one of the reasons I tend to code things in PHP instead of Javascript.

Paul

-- 
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com

--- End Message ---
--- Begin Message ---
On Tue, Jul 17, 2012 at 4:58 PM, Paul M Foster <pa...@quillandmouse.com> wrote:
> On Wed, Jul 18, 2012 at 08:45:34AM +1200, James Newman wrote:
>
>> Just to put my 2cents in, you might want to try jQuery if you're going to
>> go down the AJAX road.
>
> JQuery is a LOT of code to include if you're just going to do an AJAX
> call or two. There are examples of doing straight AJAX with Javascript
> on the 'Net. Once you work through them, you find that there's a
> "static" part that you can include in all the files you want to make
> AJAX calls. And then there's the part that deals directly with the data
> you get back from whatever PHP or other script is feeding you data from
> outside the website. That's the part that needs custom work. I *hate*
> Javascript, but I managed to figure it out.
>
> Another point: I'm not sure if it's the same for other people. I'm on a
> crappy little computer running Linux. I've got a little CPU meter in my
> taskbar. And nothing jacks that meter up like Javascript. I don't know
> why, but Javascript just devours CPU on my computer. The more
> javascript, the worse. And like I said, JQuery is a LOT of code. This is
> one of the reasons I tend to code things in PHP instead of Javascript.
>
> Paul
>

I found some time ago that a lot of those simple little AJAX examples
actually cause Javascript memory leaks. You can search the web to
learn how to handle the resources correctly yourself, but the
libraries like jQuery and YUI that are available do it for you and
seem to eliminate most of the leaks that I've seen. YMMV.

Andrew

--- End Message ---
--- Begin Message ---
On 17 Jul 2012 at 21:58, Paul M Foster <pa...@quillandmouse.com> wrote: 

> On Wed, Jul 18, 2012 at 08:45:34AM +1200, James Newman wrote:
>
>> Just to put my 2cents in, you might want to try jQuery if you're going to
>> go down the AJAX road.
>
> JQuery is a LOT of code to include if you're just going to do an AJAX
> call or two. There are examples of doing straight AJAX with Javascript
> on the 'Net. Once you work through them, you find that there's a
> "static" part that you can include in all the files you want to make
> AJAX calls. And then there's the part that deals directly with the data
> you get back from whatever PHP or other script is feeding you data from
> outside the website. That's the part that needs custom work. I *hate*
> Javascript, but I managed to figure it out.

I agree about JQuery. You can look here:

  http://www.clothears.org.uk/examples-ajax.php

to see a simple example of how to use AJAX.

--
Cheers  --  Tim

--- End Message ---
--- Begin Message ---
Op 17 jul. 2012 22:44 schreef "James Newman" <james.new...@primalmedia.co.nz>
het volgende:
>
> I agree with your response, the payment gateway insists that the
> authentication I have been given is correct.  My question was more around
> "was I using the function correctly".  It says authentication failed but
> I've followed he documentation to the letter. Is there a way I can output
> what the server is saying when a request is sent?
>

Well, that really depends on the payment gateway. Anyway it should of
course work if you have followed the documentation. Just want to let you
know that you're probably not going to get a in depth response on how to
use the payment gateway, since that is specific to your provider. The best
way of looking what you're sending to the server and back is using a packet
logger, for example wireshark. Though, make sure you run the capture on the
webserver ..

- Matijn

--- End Message ---
--- Begin Message ---
Hold on there fireball. 

* jQuery for production (minified) is a scant 32k. http://jquery.com/
  LOL That's like a TCP/IP packet. I bet your images are bigger than 32k.

* Unlike stupid PHP frameworks (which everyone knows I detest)
  - JS frameworks are cached by the browser so there is no download on every
page
  - JS frameworks take all the bullshit browser discrepancies out of your
way

* once you start using jQuery, you will <3 it and use it for many other
tasks 
  you'd beat your head against a wall in plain old JS to do.

* All the plugins to add extra functionality make it that much more enticing

I've not tried YUI or Google's JS framework, but I can tell you that 
jQuery pretty much rocks harder than Pantera and you're doing yourself,
and your customers a disservice if you're not using it. 

We get nearly 30,000 hits per second (yes PER SECOND) and have no problems 
using jQuery and many plugins and various .css files

We use this too to cram all the .js and .css into one 'package': 
http://developer.yahoo.com/yui/compressor/

d

> -----Original Message-----
> From: Paul M Foster [mailto:pa...@quillandmouse.com]
> Sent: Tuesday, July 17, 2012 1:59 PM
> To: php-gene...@lists.php.net
> Subject: Re: [PHP] Creating drop-down menus
> 
> On Wed, Jul 18, 2012 at 08:45:34AM +1200, James Newman wrote:
> 
> > Just to put my 2cents in, you might want to try jQuery if you're going
to
> > go down the AJAX road.
> 
> JQuery is a LOT of code to include if you're just going to do an AJAX
> call or two. There are examples of doing straight AJAX with Javascript
> on the 'Net. Once you work through them, you find that there's a
> "static" part that you can include in all the files you want to make
> AJAX calls. And then there's the part that deals directly with the data
> you get back from whatever PHP or other script is feeding you data from
> outside the website. That's the part that needs custom work. I *hate*
> Javascript, but I managed to figure it out.
> 
> Another point: I'm not sure if it's the same for other people. I'm on a
> crappy little computer running Linux. I've got a little CPU meter in my
> taskbar. And nothing jacks that meter up like Javascript. I don't know
> why, but Javascript just devours CPU on my computer. The more
> javascript, the worse. And like I said, JQuery is a LOT of code. This is
> one of the reasons I tend to code things in PHP instead of Javascript.
> 
> Paul
> 
> --
> Paul M. Foster
> http://noferblatz.com
> http://quillandmouse.com
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message --- [snip]On 7/17/2012 4:55 PM, Daevid Vincent wrote: * jQuery for production (minified) is a scant 32k. http://jquery.com/ LOL That's like a TCP/IP packet. I bet your images are bigger than 32k. * Unlike stupid PHP frameworks (which everyone knows I detest) - JS frameworks are cached by the browser so there is no download on every page - JS frameworks take all the bullshit browser discrepancies out of your way * once you start using jQuery, you will <3 it and use it for many other tasks you'd beat your head against a wall in plain old JS to do. * All the plugins to add extra functionality make it that much more enticing I've not tried YUI or Google's JS framework, but I can tell you that jQuery pretty much rocks harder than Pantera and you're doing yourself, and your customers a disservice if you're not using it.[/snip]

This.

[snip]JQuery is a LOT of code to include if you're just going to do an AJAX call or two. [/snip]

jQuery 1.8 will allow you to create custom builds, including only the services that you want. That is coming out really soon. Besides, minified and gZipped....well see above.

Maybe I am biased. I am on the jQuery Developer Relations team, have authored one book on jQuery and I am currently writing another. But I think you'll love it.



--- End Message ---
--- Begin Message ---
Hi all,
Wondering about the difference between PECL and PEAR, I found:
http://board.phpbuilder.com/showthread.php?10339238-Pecl-vs-Pear

Is it a suitable answer?

If so, several Linux ditribution have:
* php-pecl-xxx (PECL)
* php-pear-vvv (PEAR)
* php-yyy  (???)
packages (rpm and deb).

What about the last kind?

--
RMA.


--- End Message ---

Reply via email to