RE: [php-49] Making only part of the page dynamic

From: Mike R.
Sent on: Friday, January 16, 2009 10:11 AM
I would suggest using the clean method of javascript. I personally use jQuery for all my javascript needs.

Create each companies info in a div

<div class="companyInfo company1">This is where I put my company info</div>

Then make the links 

<span class="companyLink" company="1">This is a link to company1</span>­

Then add a little jQuery code

$(document).ready(fu­nction() { 
     $(".companyLink").cl­ick(function() {
From: [address removed] [[address removed]] On Behalf Of Manuel Lemos [[address removed]]
Sent: Friday, January 16,[masked]:58 AM
To: [address removed]
Subject: Re: [php-49] Making only part of the page dynamic

Hello David,

on 01/16/[masked]:46 PM David Malouf said the following:
> I'm writing to y'all because I don't even know where to begin in my
> search for a solution...
> I have a request to write a page that has a top and bottom 'half' - the
> top half has the name of 5 companies (possibly up to 30, but 5 for
> now).  The bottom half will display the company's address, notes, email,
> etc.
> I'd like to do this in such a way that doesn't reload the entire page
> but instead, calls only the relevant contact information (the 'bottom
> half').
> Also, the "5 companies" listed will be dynamically created (i.e. it's
> not always the same 5 companies).

This looks very simple. Just use iframe.

<a href="load_company.p­hp?company=1" target="company">­Company 1</a>

<a href="load_company.p­hp?company=2" target="company">­Company 2</a>

<a href="load_company.p­hp?company=3" target="company">­Company 3</a>

<a href="load_company.p­hp?company=4" target="company">­Company 4</a>

<a href="load_company.p­hp?company=5" target="company">­Company 5</a>

<xiframe name="company" id="company" style="width: 100%; height:


Manuel Lemos

Find and post PHP jobs

PHP Classes - Free ready to use OOP components written in PHP

Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Manuel Lemos ([address removed]) from The Seattle PHP Meetup Group.
To learn more about Manuel Lemos, visit his/her member profile: http://php.meetup...­
To unsubscribe or to update your mailing list settings, click here: http://www.meetup...­
Meetup Support: [address removed]
632 Broadway, New York, NY 10012 USA

Our Sponsors

  • TUNE

    Meeting space and food

  • PluralSight

    PluralSight subscriptions for developer training

  • Siteground

    Information coming Soon

  • O'Reilly

    Disc Code: PCBW is good for 40% off print and 50% off ebooks and videos

  • JetBrains PhpStorm

    Occasional free licenses to raffle off at meetups

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy