Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Master Detail Page Set link - to a Lightbox feature?

New Here ,
Sep 20, 2012 Sep 20, 2012

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

TOPICS
Server side applications
793
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 20, 2012 Sep 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>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 20, 2012 Sep 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?

staff-list-pic.png

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

staff-list-pic-2-lightbox.png
Would I add my  -  staffdetailspage code & recordset to the ?

<p>ECHO HERE</p>

(the page that the link goes to now)          

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 20, 2012 Sep 20, 2012
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines