I installed Lightbox2 module and I tried to link an image to a webpage, say google.com, this is my code

<a href="https://www.google.com/" rel="lightframe[][This is Google]"><img  src="<?php print $base_url;?>/sites/all/themes/MY-THEME/image/fp/map.jpg"></a>

but it displays nothing in Lightbhox. This is the print screen of the Lightbox using Firebug

enter image description here

as you can see there is nothing in body.

  • Look at your browser error console: REFUSED TO DISPLAY IN A FRAME BECAUSE IT SET 'X-FRAME-OPTIONS' TO 'SAMEORIG, ie it is a cross domain restriction. This works: <a href="maps.google.co.in/maps/… map</a> Oct 14, 2014 at 15:44
  • And probably not of much help, but if you install this extension for Chrome it strips away the X-Frame headers. Otherwise just append &output=embed to the url and set the other parameters as needed. Oct 14, 2014 at 15:58
  • @J.Reynolds you are right, then what shall I do to link to google? I also added this code header('X-Frame-Options: GOFORIT'); but didn't work
    – M a m a D
    Oct 14, 2014 at 16:35

1 Answer 1


This link works to get google search in the ligtbox:

<a href="http://www.google.com/custom?q=&btnG=Search"rel="lightframe">Search</a>

I got it from this post: How to show google.com in an iframe?

  • thanks, for google map adding &output=embed works as well
    – M a m a D
    Oct 14, 2014 at 18:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.