Skip to main content
Participant
September 20, 2012
Question

Master Detail Page Set link - to a Lightbox feature?

  • September 20, 2012
  • 3 replies
  • 802 views

I'm hoping someone can point me in the right direction here. I have set-up a master & detail page from a recordset and it is working as it should, however my client would like to have the details show up in a lightbox instead of going to another page. How can I accomplish this? I have a lightbox that I am using called pretty photo... which is also working, I just am looking for a way to have them work together.

Thanks,

Bret

This topic is closed to new replies. Start a new post to keep the conversation going.

3 replies

sudarshan.t
Inspiring
September 20, 2012

Echo your PHP data using inline code for Prettyphoto as HTML.

<a href="#inline-1" rel="prettyPhoto" >Click to view details</a>

<div id="inline-1" class="hide">

<p>This is inline content opened in prettyPhoto.</p>

<p>ECHO HERE</p></div>

</div>

MaxTalAuthor
Participant
September 20, 2012

Thank you! that is getting me there I think I did change a couple things.... although I am still not sure how to tie the two links together.

<a href="#inline-1" rel="prettyPhoto[inline]">Click to view details </a>

     <div id="inline-1" style="display:none;">

          <p>This is inline content opened in prettyPhoto.</p>

          <p>ECHO HERE</p>

     </div>


This is the current link that redirects to a new page showing all info from recordset:

<a href="staffDetail.php?recordID=<?php echo $row_rsStaffMaster['staffID']; ?>"> <?php echo $row_rsStaffMaster['lastName']; ?></a>

What I need is the current link to display into the lightbox. How do I seperate the echo and still keep the staffID part?

Thanks

UPDATE:

Ok so I have updated the link this way...

    <a href="#inline-1 staffDetail.php?recordID=<?php echo $row_rsStaffMaster['staffID']; ?> "rel="prettyPhoto[inline]"><?php echo $row_rsStaffMaster['lastName'];?></a>

        <div id="inline-1" style="display:none;">

            <p>This is inline content opened in prettyPhoto.</p>

            <p>ECHO HERE</p>

        </div>


And this now open the lightbox... but all it does is give me a tiny lightbox of content | null


Would I add my  -  staffdetailspage code & recordset to the ?

<p>ECHO HERE</p>

(the page that the link goes to now)          

sudarshan.t
Inspiring
September 21, 2012

Define a variable value for your details URL (name it contenturl). Then define a variable to fetch contents from the variable URL with file_get_content (name it content).

Echo content within <p>ECHO HERE</p> section.