0

Hi I have this JS CODE

function openPopup(url)
{

    var newElem = new Element( 'div' );
    newElem.setAttribute('rel','handler');
    newElem.setAttribute('class','modal');
    SqueezeBox.setContent( 'adopt', newElem );
    SqueezeBox.setContent( 'iframe', url);

}

This open a popup with the given URL.I'd like to change the size of the SqueezeBox how to do it?

Manoj
  • 5,542
  • 9
  • 54
  • 80
Rad
  • 4,403
  • 4
  • 24
  • 25

1 Answers1

1

Please try SqueezeBox.resize({x: 350, y: 400});

Of course you have to resize your content also, as in

SqueezeBox.initialize({
    size: {x: 350, y: 400}
});

var newElem = new Element( 'div' );
newElem.appendText("Some Text");
newElem.setStyle('border', 'solid 2px black');
newElem.setStyle('width', '300px');
SqueezeBox.setContent('adopt', newElem);

SqueezeBox.resize({x: 750, y: 400})
newElem.setStyle('width', '700px'); 
Wolfgang Kuehn
  • 12,206
  • 2
  • 33
  • 46
  • Soory, But I got A litel problem here, the content of the SqueezeBox does not fill with the entier size of the SqueezeBox I'mean even If i changed the size of the SqueezeBox the content it's self is show I just shonw in a limeted space – Rad Jun 08 '11 at 09:10
  • Hi, Sorry I'f I'm late here is the code function openPopup(url) { SqueezeBox.initialize({ size: {x: 350, y: 400} }); var newElem = new Element( 'div' ); SqueezeBox.setContent('adopt', newElem); SqueezeBox.setContent( 'iframe', url); SqueezeBox.setContent( 'iframe', url); SqueezeBox.resize({x: 750, y: 400}) newElem.setStyle('width', '700px'); } I don't relay know why I have ti put this code twice SqueezeBox.setContent( 'iframe', url); I'f I dont put it I got a blanc SqueezeBox, And If i put it twice The content of the squeezeBox is not what I want it – Rad Jun 08 '11 at 15:44