NYCPHP Meetup

NYPHP.org

[nycphp-talk] Javascript trigger

billy reisinger billy.reisinger at gmail.com
Tue Mar 28 08:49:48 EST 2006


Not necessarily - you don't have to use Ajax in this case. As Alberto said
in the first reply to your post, you can embed a Javascript array (built by
PHP during the page request) that is embedded in the page source or is
included in a javascript file.  You can then use the values in this array to
populate your menu on the fly.  No need for asynchronous requests (Ajax).
Not that I don't like Ajax, but it is not necessarily the ideal solution in
this case - why grab the menu data from the database every time the user
mouses over or selects a parent category?  There is certain to be noticeable
latency every once in a while; in addition, this behavior wastes bandwidth
and server processing time.  If you were running a website that got a ton of
traffic, this would be a big no-no.
Uncle Billy

On 3/27/06, Alberto dos Santos <yournway at gmail.com> wrote:
>
> Thank you all,
> I think I have to study that "ajax thing", oh dear....
>
> Cheers,
>
>
>
>
> --
> Alberto dos Santos
> Consultor em TI
> IT Consultant
>
> http://www.yournway.com
> A internet à sua maneira.
> The Internet your own way.
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
> New York PHP Conference and Expo 2006
> http://www.nyphpcon.com
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20060328/9c88353d/attachment.html>


More information about the talk mailing list