SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2010
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Fancybox zoom feature and how to display html in source code

    I'm not exactly sure as to whether this question should be posted here or on the php forum, but I think it mainly has to do with fancybox's zoom feature.

    My problem is this.

    I'm doing SEO for an already established site and this site has a features area with about three different options that use the fancybox zoom script. These boxes all contain pertinent information (SEO heavy) about each option as well as links to different sites. All of the info displayed is pulled from a database via php.

    I would like to be able to display the descriptions as searchable content, and be able to track how many people click on the external links, but as it is now none of this shows up on the source code. The fancybox zoom feature seems to open up another window within my main page.

    My question is this. Is there anyway that I can retain fancybox and get the content to come up under the source code? Or does this maybe even sound like an unusual effect from fancybox.

    I can send some code later, if anyone needs it. I just didn't want to throw everything in here all at once, because it's quite a bit of code involved.
    Thanks for any help you might be able to offer.

  2. #2
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You would need the fancybox content to be already existent but hidden via CSS in the raw HTML source and "opened" by fancybox in an inline way. In other words, all fancybox does is take an existing <div> (for instance) and moves it into (or clones it) into the fancybox. You'll find examples for using inline HTML on the fancybox homepage.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2010
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I guess my problem is that the id(css) that I would use to call the popup box is an actual link to another page, which a value is passed through.
    PHP Code:
    echo "<a 
    href='featured_info.php?fb_id="
    .$row_featured['fb_id']."' class ='zoom'><img src='../admin/images/featured_image".$row_featured['fb_image']."' alt='".$row_featured['fb_name']."' width='142' height='203'/></a><br />"
    that page is the one that gathers most of the information, and even if I can get the slightest bit of it to show on the source code it still won't show the amount pulled from the database.

  4. #4
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You don't need an ID. You can do it with any CSS selector you want.

  5. #5
    SitePoint Enthusiast
    Join Date
    Jul 2010
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I do need a standard css selector to create content within the page, however the link is setup to pull another page to display within the fancybox window. This is the only way that I know of that the value for 'fb_id' is passed through, which I will need to later pull info from the database on the next page.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •