Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8476709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:15:18+00:00 2026-06-10T18:15:18+00:00

I have page in my website that lists all projects thumbs. When a particular

  • 0

I have page in my website that lists all projects thumbs. When a particular thumb (project) is clicked, Fancybox loads project’s details in iframe. All works great! (Content in iframe DOES NOT include navigation, header and other website elements.)

The problem I have is with Google search results page – Google indexed all details pages, and now when user clicks the link from Google results, details content page is opened in browser (instead Fancybox iframe). That is bad since details page does not iclude navigation pages.

Any user friendly solution?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T18:15:20+00:00Added an answer on June 10, 2026 at 6:15 pm

    As I mentioned in my comment, you would need to include in each “detail” page a script to sniff the URL and detect if the page was opened in a new window (top page), if so redirect to the main page with a modified URL (using a hash for instance) that will allow to open the “detail” page in fancybox from the main page.

    So you could include in each “detail” page this script:

    <script type="text/javascript">
    var isWindow = self == top; // returns true if opened in a new window, otherwise it migh be inside an iframe
    if(isWindow){ 
     // alert("this page was opened in a new browser window");
     // then redirect to main page and add hash "detailedXX"
     window.location = "{URL}/mainpage.html#detailed01"
    }
    </script>
    

    Change detailed01 to different value for each “detail” page.

    Then in the main page you may have links to each detail page like

    <a id="detailed01" class="fancybox" href="detailed01.html">Open project detail page 01 in fancybox</a>
    <a id="detailed02" class="fancybox" href="detailed02.html">Open project detail page 02 in fancybox</a>
    

    Notice that I included an ID to each anchor that matches the hash that we will be using while redirecting to the main page.

    Then your fancybox script can be something like:

    <script type="text/javascript">
    var thisHash = window.location.hash;
    $(document).ready(function() {
     if(window.location.hash) {
      // get the URL without hash so we can restore it if needed
      var thisWindowLocation = window.location;
      var thisWindowLocationSplit = String(thisWindowLocation).split("#")[0];
      $(thisHash).fancybox({
       width: 800,
       height: 320,
       fitToView: false,
       autoSize : false,
       type: 'iframe',
       afterClose : function(){
        // returns URL to main page with no hash
        window.location = thisWindowLocationSplit
       }
      }).trigger('click');
     }
    // fancybox for normal main page operation
     $(".fancybox").fancybox({
      width: 800,
      height: 320,
      fitToView: false,
      autoSize : false,
      type: 'iframe'
     });
    }); // ready
    </script>
    

    I set a DEMO here

    This demo open two “detail” pages :

    http://www.picssel.com/playground/jquery/detailed01.html
    and
    http://www.picssel.com/playground/jquery/detailed02.html

    If you try to open them directly, the will redirect to the calling page and open in fancybox

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a website that requires a very large background image. The page loads
I have a website that has products list page and product detail page .
I have a single page website that changes content based on variables passed through
I have a website that does not have page refreshes when the visitor navigates
I have a page on a website that contains a secure form inside an
i am porting over a website from asp. i have one page that i
I have a table that lists users that are registered at my website. The
I have a website project. It has assembly references to external DLLs that we
We have a website that lists links to blogs in realtime. The problem is
I have made a website that uses unordered lists. These lists use an image

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.