1

I have a link

<a class="modal" rel="{handler: 'iframe', size: {x: 500, y: 400}}" href="http://localhost/site/index.php">Site</a>

Which opens its href in lightbox. I want to remove scrolls from an iframe and I found this '"scorlling=no"'.I could not find a way to add this property in iframe. I tried this

jQuery(document).ready(function($) {
    $(".modal").click(function() {
      $("#sbox-content iframe").attr("scrolling","no")
    });
});

But it's not working. Is this possible or what is the best way to do this?
Thanks.

Community
  • 1
  • 1
Irfan
  • 7,029
  • 3
  • 42
  • 57

3 Answers3

0

Can you try this:

   <a class="modal" rel="{handler: 'iframe', size: {x: 500, y: 400},scrolling:no}" href="http://localhost/site/index.php">Site</a>

not sure but you may give it a shot.

beNerd
  • 3,314
  • 6
  • 54
  • 92
0

Try using site/index.php instead http://localhost/site/index.php, iframes are protected in browsers - especially when they are showing page from other domain.

IProblemFactory
  • 9,551
  • 8
  • 50
  • 66
0

Specifying overflow: hidden for the iframe works. Demo: http://jsfiddle.net/6RGxh/


Specify overflow: hidden for the <html> element in your localhost/site/index.php file.

techfoobar
  • 65,616
  • 14
  • 114
  • 135
  • Thanks this is working.But one thing I wanted to know can we do something from our side without adding anything in localhost/site/index.php – Irfan Sep 22 '12 at 08:13
  • This does not work in chrome.http://stackoverflow.com/a/9678294/902161 I think for doing so we'll have to add this to localhost/site/index.php because this is working. – Irfan Sep 22 '12 at 08:26