DISQUS

digitarald:Harald K: SqueezeBox - Expandable Lightbox

  • marty · 1 year ago
    Great job.
    It it possible to open another squeezebox with a link from within the squeezebox itself? ('refreshing' the squeezebox content)
    And -to make it more of a challenge ;) - do this with just html?
  • digitarald · 1 year ago
    Use the event `onUpdate` to add your own behaviour to the new content. A click in the box-link reuses the same SqueezeBox and loads the new link ... works great. If you are evil and hate unobtrusive code, you can also use a onclick attribute in your html, no need to use onUpdate to add behaviour then.
  • RaYz · 1 year ago
    hey it's ok digitarald thanks :)

    Now i use SqueezeBox.fromElement(url)

    What is the second argument to lauch an iframe and other settings ?
  • digitarald · 1 year ago
    `SqueezeBox.fromElement(url, {handler: 'iframe', size: {x: 500, y: 500}})` ... you can override all the default options.
  • RaYz · 1 year ago
    Hello, i've try the Brizz solution and its work ! thx.

    But i have an other problem, i'm french and usually use the letter : é à è, but we can't see it in the Box, the are replace by �
  • digitarald · 1 year ago
    I added Brizz fix to the code, just redownload it. Xhr requests always use [utf-8 internally](http://developer.mozilla.org/en/docs/XMLHttpRequest#Basic_Usage), so one reason for invalid encoding could be, that u use iso. HTML-encode them or switch your content-type to utf-8.
  • RaYz · 1 year ago
    Ok i'll try it thanks :)
  • Tom Stone · 1 year ago
    Wonderful work.
    Although, I'm a bit curious over the changelog that says this is version 1.1 rc1 , but in the actual js-file, the version number is: 1.1 rc0.
  • digitarald · 1 year ago
    Thanks Tom Stone, I only forgot to change the version number, fixed.
  • Jordi · 1 year ago
    It's not working in IE7 for Vista. Instead of the images appears the code:

    {"presets":{"size":{"x":600,"y":450},"sizeLoading":{"x":200,"y":150},"marginInner":{"x":20,"y":20},"marginImage":{"x":50,"y":75},"handler":false,"target":null,"closable":true,"closeBtn":true,"zIndex":65555,"overlayOpacity":0.7,"classWindow":"","classOverlay":"","overlayFx":{},"resizeFx":{},"contentFx":{},"parse":false,"parseSecure":false,"ajaxOptions":{}},"handlers":{},"parsers":{},"options":{"size":{"x":600,"y":450},"sizeLoading":{"x":200,"y":150},"marginInner":{"x":20,"y":20},"marginImage":{"x":50,"y":75},"handler":false,"target":null,"closable":true,"closeBtn":true,"zIndex":65555,"overlayOpacity":0.7,"classWindow":"","classOverlay":"","overlayFx":{},"resizeFx":{},"contentFx":{},"parse":false,"parseSecure":false,"ajaxOptions":{}},"fx":{"overlay":{"options":{"fps":50,"unit":false,"duration":250,"link":"cancel","property":"opacity","onStart":null},"Implements":[],"property":"opacity","from":[{"value":0.7,"parser":{}}],"to":[{"value":0,"parser":{}}],"time":273,"timer":null,"$chain":[]},"win":{"options":{"fps":50,"unit":"px","duration":750,"link":"cancel","onStart":null}},"content":{"options":{"fps":50,"unit":false,"duration":250,"link":"cancel","property":"opacity"},"property":"opacity","from":[{"value":0,"parser":{}}],"to":[{"value":1,"parser":{}}],"time":276,"timer":null}},"bound":{},"isLoading":false,"isOpen":null,"url":"http://farm3.static.flickr.com/2370/1623259465_2cc4144b4d.jpg","applyTimer":null,"size":{"x":600,"y":450},"showTimer":76622211,"asset":null}

    Regards.
  • digitarald · 1 year ago
    Wow, that is weird ... I can reproduce it and work on a fix.
  • Blake Bertuccelli · 1 year ago
    Great stuff... The only problem I'm having is when an image is clicked for the first time (in Safari 3 at least) the loader comes up and never stops. But then if you click the image again, it'll come up fine perfect. Any solution?

    You can hopefully see my (modified) dilemma at http://borkurs.com/tests/images.html
  • digitarald · 1 year ago
    I'll check a bit more in safari, it acts really weird sometimes but I'm sure that its an easy fix when I found the problem.
  • Joran Kok · 1 year ago
    Have you already found a solution to Blake's problem? I'm having the same issue with Safari.

    I'm also getting a vertical scollbar when I open the SqueezeBox.
  • Tyler Craft · 9 months ago
    Just a heads up, I've experienced this in all browsers. I'm also using tinymce 3.2.1.1. Once that js include is removed from the page it works fine.
  • Chris · 9 months ago
    Any news on the solution to this? I'm having the same issue.
  • John · 1 year ago
    Hey, first of all, SqueezeBox is great. However, how can I activate such an iFrame from a flash movie? Is there a way to do that? Thanks in advance.
  • digitarald · 1 year ago
    Activate IFrame from Flash ... sure, works. U can call JS from via ActionScript, just like u set an url.
  • John · 1 year ago
    Thanks for the reply, of course I know how to trigger an url from flash, however I must have some javascript to do that to give the iframe and class options. However I'm not a js freak or so. I figured out the folowing function I trigger from a flash file. Suprise suprise, it does not work :)
    <script type="text/javascript">
    function openSqueezeBox(url) {
    SqueezeBox.assign($$(url), {
    parse: {handler:'iframe',size:{x:840,y:550}}
    });
    }
    </script>
    My flash looks like this then:
    on (release){
    getURL("javascript:openSqueezeBox('http://www.stijlhoogstraten.be')");
    }
  • digitarald · 1 year ago
    No $$ around the url
  • Brizz · 1 year ago
    I'm having the same IE problems as above. It's pretty much preventing me from being able to use SqueezeBox on a site I'm developing. Can you give us a hotfix or something? In looking through the code, I can't see anything that should be causing that.
  • Brizz · 1 year ago
    I find this problem. I hope it helps you and others!

    Line 120:
    for (var key in this.parsers) {
    if (! this.parsers.filter(Function.type).has(key)) continue;
    var content = this.parsers[key].call(this);
    if (content) return this.setContent(key, content);
    }
  • digitarald · 1 year ago
    Thanks a lot for this solution Brizz! I'll test it tomorrow and include it, had too much work here to look into it before.
  • digitarald · 1 year ago
    I adapted your fix, forgot to use Hash loops, all works now as expected.
  • Brizz · 1 year ago
    Sorry about my "ugly unindented code" :)
  • RaYz · 1 year ago
    I would like to lauch the Squeeze box with javascript only, is it possible ?
  • digitarald · 1 year ago
    call SqueezeBox.fromElement, but I'll add an extra method for that.
  • RaYz · 1 year ago
    thanks for your anwser :)
    i think fromElement isn't accepted by Firefox, is there an other tips ? But if you add an extra method it's perfect :P
  • Ioustinos · 1 year ago
    hi there,
    I get an error when trying to open an ajax request on the squeezebox.
    The error is
    B.camelCase is not a function, on mootools.js
    Why is this?
  • digitarald · 1 year ago
    Check if u use MooTools 1.2 trunk.
  • Ioustinos · 1 year ago
    moreover how can i force a squeezebox open?
  • Lasse · 1 year ago
    Hello, great script. I am trying to use in a way that first loads in a html file, with a form. The html site then uses mootools' ajax class to send the form data to a php script. But I can't seem to figure out a way to do it. I've set up a test site here: http://lassemoos.com/moos_gallery/bjkj_test/GAL... - try loading the form, put some text in, and press enter. What I would like to happen was for the php script to output the response in the Squeezebox window.

    The php script is very simple:
    <?php
    print "<pre>".print_r($_POST, true)."</pre>";
    ?>
  • virtualgadjo · 1 year ago
    hi, was lurking around searching something to learn :) and, a little try later, in Ie7, when closing the youtube Flash squeeze box, the video keeps playing in the background (can hear it) till you refresh the page. Works fine in FF
    great new website anyway :)

    have swing
  • Roman · 1 year ago
    i don't know why but it doesn't work for me... what is the mistake?
    Can u help me?

    http://www.lariko.net/test/test.html
  • digitarald · 1 year ago
    You need to include Fx.Transitions in Mootools, I forgot to add it.
  • gonchuki · 1 year ago
    I love this code Harald :)
    I'm already using it for an upcoming site and I'm hacking your code here and there to add what I need ^_^
    a couple suggestions from what I have done:
    - add a callback on iframe load
    - add an option to hide the iframe while loading (current code adopts the iframe before it finished loading so you never see the throbber, and cannot add a throbber to the inner page while it has no body, may be even make that a default and not an option)
    - add a position option so you can manually place the overlay for certain situations instead of getting it centered

    and I guess I did something else but I have that at work ^_^
    I will be sure to let you know about the site once it goes live :)
  • digitarald · 1 year ago
    How would you add a position option? I'm not sure about the iframe load option, since u can usually use and see a webpage before its fully loaded. Can I see it in action?
  • Nemok · 1 year ago
    Please Please Please add a way to open it from JavaScript. I would be so great if I could call a function like DoModal and give as params all info it needs.
  • digitarald · 1 year ago
    Simply call SqueezeBox.fromElement with a freshly created element or an url (page or image) and see what happens ;)
  • Crafty · 1 year ago
    I feel cheap for asking, considering the amount of amazing work you've already produced. But is there a version with photo captions? I would love to see the white frame nice and thick on the bottom (like a polaroid) where a caption (the title attribute from the anchor tag? or alt from img tag?) could be displayed. Seriously, your work is amazing... I am going to quit my job and study your code, then come back and get rehired for more money.
  • digitarald · 1 year ago
    A caption is planned ... a long time. But I never had the time and the feeling to add it, since I use it for HTML most times :)
  • rexxars · 1 year ago
    I wanted the SqueezeBox modal to only close itself when clicking on the close button, instead of on the modal itself. I modified the code with two simple lines which seems to do the trick:

    In the presets:
    `closeOnModalClick: true,`

    And on line ~214, instead of:
    `this.overlay[fn]('click', this.bound.close);`

    I put:
    `if(this.options.closeOnModalClick) this.overlay[fn]('click', this.bound.close);`

    Just thought I'd share, if anyone is interested :-)
  • digitarald · 1 year ago
    You can also use the closable callback. But I'll add that option.
  • gonchuki · 1 year ago
    14 more days for the site to go live, we are running against the clock :)

    the issue with the iframe is that while javascript and css is loading, there's no feedback for the user as the <iframe> element gets over the throbber in the background, only after that you see real feedback in the form of progressive rendering in the page.

    position is just an addition to options.position and then modify the positioning code to ask for example: this.options.position.y ? this.options.position.y : (standard centering code)

    btw: this should have gone below your answer, this disqus thing is definitely behaving on me.
  • digitarald · 1 year ago
    So a given position should be relative to the window scroll position.

    And an iframe would animate to loaded state when it has a loaded body element?
  • gonchuki · 1 year ago
    I'm guessing a yes to the first question, however in my particular case I always know there's no scroll so I didn't think about that.

    The other, I don't know if you can detect the presence of the body in the iframe, but if you can that's definitely the best option.
    my solution added this line into the iframe creation code (after line 372 in RC2):
    events: { load: function(){ $try(this.fireEvent('onIframeLoad', [this.win]))}.bind(this) }
    and I externally hide the iframe onLoad and show it again onIframeLoad
    (I cannot recall right now why I had to add the $try, may be it's not needed at all and was just defensive programming... I did this over 2 weeks ago.)
  • nicholasyoung · 1 year ago
    is there a way to launch SqueezeBox by using a javascript call to the ajax loader in mootools, or have i just overlooked it?
  • RaYz · 1 year ago
    hello, fromElement is not compatible with firefox :'(
    Please how can we lauch lightbox with javascript function ?
  • digitarald · 1 year ago
    fromElement is even compatible with my toaster ... its not so hard. I use it here all day to open everything.
  • deedee · 1 year ago
    I'm having problems implementing this script... I'm getting the following error message:
    "$empty is not defined"

    using Firefox 1.5+ and mootool 1.2b dev build 1553
  • digitarald · 1 year ago
    Redownload mootools and check if its included properly ...
  • Joe Nathan · 1 year ago
    Great product - couple of missing things

    1. Caption support
    2. Animation in iFrame mode - which brings upto slimbox_ex in functionality

    Hope they go into next code drop. Do you have any idea when next code drop will be.

    Thanks great product once again
  • digitarald · 1 year ago
    SqueezeBox animation philosophy is: When nothing loads slow, you don't need to animate. Thats why it doesn't animate when images are cached or ajax requests load faster then the site gets black. Saves time ... so why should it animate iframes, there is no useful load state, since onload fires very late when the target site has a lot of images.
  • Joe Nathan · 1 year ago
    OK - I understand you don't want to apply lightbox style animation in Iframe mode - could you give me quick tip on how I go about changing the code to do animation in iFrame mode .

    Thanks
  • Wil · 1 year ago
    Can you disable scrollbars in the windows?
  • digitarald · 1 year ago
    Force to enable them with CSS, its usually a good practice, since IE shows them all the time, only FF triggers them and makes the page jumping
  • michaelrjohnson · 1 year ago
    Of course, I'm showing now incredibly ignorant I am when it comes to javascript, but I've been banging my head against a wall for 2 hours now, and just cannot get this working on this sandbox page.

    I just want simple iframe content, but it's like the scripts don't kick in and parse the data, so it just acts as a regular link.

    Thank you for all your effort, and I appreciate your assistance.

    http://www.bobinsurance.com/sandbox.html
  • digitarald · 1 year ago
    You (and me) forgot JSON in your MooTools module-list. Sorry
  • michaelrjohnson · 1 year ago
    Thanks a lot. I really appreciate it!
  • Jordy · 1 year ago
    First of all, thanx for all your briliant work!
    Today i ran into a inconsequent problem with Squeezebox Images on my site.
    http://www.glt-interlift.nl/?page=20
    In FF2 and IE7, sometimes images won't show and the loading GIF stays visible, while one click later the same image will show perfectly.
    FireBug doesn't show any problems, SqueezeBox just seems to freeze.
  • digitarald · 1 year ago
    And this occurs randomly, with cached or fresh images?
  • Jordy · 1 year ago
    Yes, it seems to be totaly randomly. Even with large or small items, it doesn't seem to make any difference.
  • Jordy · 11 months ago
    7 months later, still having this problem on some of my sites. Don't know why.
    However, i have a buggy workaround now:
    In the image handler, just behind the .bind(this) i place a .delay(300)

    Somehow this works for me (for smaller images though), because tmp.complete wasn't set in time or something like that.
  • ramyhasan · 1 year ago
    Hello digitarald,
    I'm trying to run this function but I still unsuccessful:

    function showSqueezeBox(id) {
    SqueezeBox.fromElement($(id).href,{size: {x: 500, y: 500}});
    }

    do you have any idea?
    Thanks and regard
  • digitarald · 1 year ago
    `function showSqueezeBox(id) { SqueezeBox.fromElement($(id), {size: {x: 500, y: 500}}); }`
    SqueezeBox reads the href automatically. So when its an image, it opens it as image. You can use the handler option to force the type.
  • ramyhasan · 1 year ago
    I have try it to run it:
    'function showSqueezeBox(id) {
    SqueezeBox.fromElement($(id), {
    handler:'iframe',
    size: {x: 500, y: 500}
    });
    }'

    The lightbox effect doesn't work and open the link as a normal link like each other standard link!
    Sorry for the annoyance and regard
  • RaYz · 1 year ago
    Hello ! I would like to close the Box after an action and do an other action in the main page (like refresh), how can i do this ?

    Thanks a lot.
  • digitarald · 1 year ago
    Use onClose event and change the location.href, like the comment some lines above.
  • Jean-Nicolas · 1 year ago
    Hello, I am trying to make sqeezebox get content from a element that has setStyle to display none... Because I just want the content to be seen when the link is click on... How do you do this?

    Thanks in advance.
  • digitarald · 1 year ago
    Only make the container of the element invisible. Otherwise you can use onUpdate event to make the content of SqueezeBox visible, its fired right after the content injection.
  • Jean-Nicolas · 1 year ago
    Hello, I tried onUpdate:

    $('webeditor-sitemap-create').setStyle('display','none');

    SqueezeBox.assign($$('a[rel=boxed][href^=#]'),{size: {x: 400, y: 300}}, {onUpdate:$('webeditor-sitemap-create').setStyle('display','block')});

    It works but the problem is that the content of $('webeditor-sitemap-create') is still being shown because of onUpdate... So is there a way to have content hidden on the page and when the link is click it shows the Box with that content that is hidden.

    Thanks in advance.
  • robert · 1 year ago
    Is it possible to add inline html <div> content using SqueezeBox? But I do not want the content to be visible only until the modal is showing. How can I do that?
  • digitarald · 1 year ago
    Simply hide a container element where the div and maybe other element are inside. Then you can clone or adopt them with SqueezeBox.
  • robert · 1 year ago
    Can we use the POST method in ajax with SqueezeBox?
  • digitarald · 1 year ago
    The example shows how to add GET as method, just change it to post ... ajaxOptions can get ALL options the Request class in MooTools has, means `data`, `headers` ... whatever.
  • Jimmy · 1 year ago
    I am trying to redirect when the modal box is closed by doing the following:

    SqueezeBox.assign($('ajax_example'), {
    size: {x: 300, y: 400},
    ajaxOptions: {
    method: 'get' // we use GET for requesting plain HTML
    },
    onClose: function() {
    self.parent.location.href ='/redirect-target.html';
    return false;
    }
    });

    But it does not work, please help, thx.
  • digitarald · 1 year ago
    `self.parent.location.href` ... don't you mean `location.href`?
  • ben · 11 months ago
    Even with location.href, onClose doesn't seem to work. It seems like a frequently asked question. Is it possible, and if so, how? The functionality of this box is great, I just wish it was documented a bit better.



    window.addEvent('domready', function() {

    /**
    * That CSS selector will find all elements with the
    * class boxed
    *
    * The example loads the options from the rel attribute
    */
    SqueezeBox.assign($$('a.boxed'), {
    parse: 'rel',
    onClose: function() { location.href ='/redirect-target.html'; return false; }
    });


    });

    doesn't work
  • ben · 11 months ago
    I found that another user suggested moving the this.trash() function on line 141 of the .js file.
    I did this and used the following code to redirect a URL after the onClose event
    /**
    window.addEvent('domready', function() {
    SqueezeBox.initialize({
    size: {x: 600, y: 400},
    onClose: function() { location.href = './index.cfm'; return false;}
    });

    SqueezeBox.assign($$('a.boxed'), {
    parse: 'rel'
    });

    }); */


    I am sure there is a better way to do it, but this worked for me, and hopefully it will help someone else.

    Thanks again for the great lightbox!
  • nrichard · 1 year ago
    Is it possible to have up to date instructions to generate the right MooTools Library (1.2Beta is OK? What are the required components?)

    Thanks!
  • pfz · 1 year ago
    Great job indeed!!
    I think I found a bug, in the close declaration (line 134). The trash call is done too early. the event onClose is therefor not fired. Moving the trash call after the fireevent solve the problem for me.
    May be this situation has been made in purpose???
  • pfz · 1 year ago
    this.trash();
  • Brad · 1 year ago
    How would you get this to launch upon going to a page?
  • michael · 1 year ago
    i would like to know this too
  • surjit · 1 year ago
    thanks lots lots.....
  • Thomas Sandor · 1 year ago
    hi Harald,
    I've tried to use onClose function but no luck.
    Here's my code:
    item.addEvent('click', function() {
    var a = new Element('a', {'href': 'http://digitarald.de/project/squeezebox/thumb.png'});
    SqueezeBox.fromElement(a, {
    onClose: function() {
    console.log('goodbye');
    }
    });
    })

    I'm using mootools-trunk-1555 and your SqueezeBox.js as found above. Browser is FF2.0.0.14 w/ Firebug.
    Do you have any idea why onClose doesn't work for me?
    Thanks for this great tool!
  • Thomas Sandor · 1 year ago
    Hi Harald,
    I've found that in SqueezeBox.js inner `"close"` method (line 135) you call `this.trash();` too early (line 141). Trashing will even remove `'onClose'` and any other previously defined methods, so it will not be called in (line 144).
    So I've moved `this.trash()`; **AFTER** `this.fireEvent('onClose', [this.content]);` and things started to work.
    If you agree, please post an update on your great tool.
    Pastebin link: http://paste.mootools.net/f7a5e8280
  • Romel Santos · 1 year ago
    Hi there, is there a way I can fire SqueezeBox from a select form element? I would like to load an external html file into a SqueezeBox using iframe by calling it from a select form element.
  • michael · 1 year ago
    i would like to use this, but i'm having trouble getting the overlay to work on top of quicktime, flash, and devalvr plugins. any advice ?
  • michael · 1 year ago
    i should mention that it actually only fails to do this on opera for windows where the modal and overlay sit behind the plugin. opera for mac is problematic too. the cursor remains a quicktime cursor and then the overlay goes behind the movie when you try to interact, flash seems to work fine afaict.

    you can check my dev site here http://pdxvr.hopto.org/vr-6-17 can't guarantee what state it's in though, i'll be tinkering all day
  • michael · 1 year ago
    um i forgot the instructions to the link. on the top right of the page there is a link 'view map' that link opens the squeezebox.
  • maddmax · 1 year ago
    Hi digitarald, good job!

    I'm try to use squeezabox as form's target. How can I do that?
  • digitarald · 1 year ago
    You need custom code for that. When opening a SB via JS, give the form element as ajaxOptions.data.
  • maddmax · 1 year ago
    uh? (8-|
  • tasmanought · 1 year ago
    Further on this question, I've been trying to launch an iframed SB and send the search form array $('makeRequest') as get data without any luck. Apologies if its really obvious - if anyone can provide any clues I'd be most grateful:

    $('displaySlideID').addEvent('click', function() {
    SqueezeBox.fromElement('artworks-slideshow.asp', {
    handler: 'iframe', size: {x: 650, y: 700},
    ajaxOptions: { method:'get', data: $('makeRequest')}
    })
    });

    The page, where SB is used extensively, can be seen here:
    http://www.frankhinder.com.au/artworks.asp
  • Justin · 1 year ago
    Anyone get this working with the just released official version of Mootools 1.2? I've built Mootools with every option and without compression. But it does not work.

    However, when I use the Mootools-trunk directly from this site, it works just fine.

    Here's what i get with the newest release of Mootools 1.2 directly from the mootools site.
    -----------------------------------------------------------------------------------------------------------
    Fx is not defined
    [Break on this error] Fx.Slide = new Class({
    mootools-1.2-more... (line 11)
    $empty is not defined
    [Break on this error] onOpen: $empty,
    SqueezeBox.js (line 39)
    window.addEvent is not a function
    [Break on this error] window.addEvent('domready', function() {
    -----------------------------------------------------------------------------------------------------------
  • Justin · 1 year ago
    Please disregard my last comment. I just put my dunce cap on.
  • ewel · 1 year ago
    To sort of answer madmax' question, I did a workaround for opening a form's target in a Squeezebox. See http://forum.joomla.org/viewtopic.php?f=428&t=2.... No idea how to do it with a proper submit button, but I would really like to know.

    I have another question as well: is there some documentation about the detailed use of options? In the examples I see parse, ajaxoptions, handler, size in initialise or in assign, and I cannot find what the possibilities are and how they are used.
    I am working with Joomla, where the initialisation is supposed to be as follows: SqueezeBox.initialize({}); $$('a.modal').each(function(el) { el.addEvent('click', function(e) { new Event(e).stop(); SqueezeBox.fromElement(el);. Without documentation I have no idea what these lines do and why, and how to do it differently.
    Are these things to be found in Mootools documentation? In short, I am at a loss how to really use this wonderful box to its potential!
  • Spider.007 · 1 year ago
    Great script thanks! I found out that overriding the zIndex preset, by passing it as an option to SqueezeBox.assign(), does not work, since this.build() uses the preset instead of the option that is passed. I fixed that by passing the options to the initialize function:

    ` fromElement: function(from, options) {
    this.initialize(options);`

    Also, could you enlighten me why script that are included in the Ajax Response disappear; even though the the default for evalScripts in Requests.HTML is supposted to be true?
  • Vince · 1 year ago
    I want to show a console in a iframe which loads 2 minutes at this time is a status shown with php: ob_flush(). so i need to disable the loading-icon, to see the loading of the page live. Is there a possiblility to do that? I would code it hard into the class. Thanks.
  • digitarald · 1 year ago
    Then better don't use the in-build Ajax. As you see in the code, you can add your own handlers.
  • Justin · 1 year ago
    I needed to manually call a SqueezeBox after a user performed an action. I see some other people needed to open a SqueezeBox on page load. Maybe my solution will work for them too.

    When my user completes an action, I do this :

    `SqueezeBox.fromElement($('linkset_search'), {handler : 'adopt'}); `

    This takes the content from the div "linkset_search" opens a SqueezeBox in "adopt" mode and displays the content.

    Hope this helps someone.

    BTW : Thanks for your project Harald. They are really saving me tons of time.
  • Justin · 1 year ago
    Here's how to manually open a SqueezeBox for an iFrame:

    `SqueezeBox.fromElement('linkset_search.php', {handler : 'iframe'});`
  • gunner · 1 year ago
    am I the only one who's closebox.png looks fine in firefox, safari, etc., but closebox.gif is chopped off in ie6? The demo on this site works fine, so obviously mine is screwed up. CSS looks the same and I haven't touched the javascript, what's up? Thanks.
  • derp · 1 year ago
    the closebox.png provided use an alpha channel, witch is not supported by ie6, hence the weird look. You can another closebox that does not use alpha channel. Also there is some weird javascript trick to make alpha channel works with ie6 using directx transform...
  • gunner · 1 year ago
    ie pulls the closebox.gif instead of the closebox.png image. All that is visible is the lower left-hand corner of the gif where it overlaps the modal box. Example at http://picasaweb.google.com/email.thedeziner/Un...
  • digitarald · 1 year ago
    What IE did u try, I can't reproduce it. Did you try to fix it in CSS?
  • sononaco · 1 year ago
    Does anyone have a solution to closing the box when it launched in an iframe?

    For example, it is possible to add an action to a button element that closes the box?

    Many thanks,

    --Keith
  • Teonator · 1 year ago
    use parent.SqueezeBox.close();
  • jon · 1 year ago
    I tried to open the SmoothBox directly by using:
    SqueezeBox.fromElement($('login'), {
    handler:'ajax',
    ajaxOptions: {
    url: "index.php",
    method: 'get' // we use GET for requesting plain HTML
    }
    });
    it doesn't work because the url is not being set

    I had to change the code around line 114, is this a bug?
    //this.url = ((this.element) ? (this.options.url || this.element.get('href')) : from) || '';
    this.url = ((this.element) ? (this.options.ajaxOptions.url || this.element.get('href')) : from) || '';
  • digitarald · 1 year ago
    mh, and why don't u set the url NOT in ajaxOptions but one level above. Then it works fine.
  • jon · 1 year ago
    yeah that's an easier solution. I had the impression that url belongs in options.ajaxOptions since it's not in specified in the options(or presets).
    Another question:
    is there a way to make SqueezBox auto size it's height to it's ajax content? I think it does that on images right?
  • Pete · 1 year ago
    Hi,
    I'm opening an iframe SB and want to target a form field value from the opening page. Is this possible if so how?
    Great project thanks.
    Pete
  • moo · 1 year ago
    onShow is not getting fired consistenly when you have ajax content, sometimes it's fired, sometimes not.
    I dont recommend it if you are using ajax content extensively and have to rely on callBacks(onShow) of squeezebox.
    it's still a great piece of software though.
  • layne · 1 year ago
    What is inserted the script?, The place within a label <head><script>JavaScript & MooTools</script></head> and I do not work, help me
  • yvesluther · 1 year ago
    What is the minimum MooTools plugin set I need to run SqueezeBox?
  • Damien Churchill · 1 year ago
    I modified it a little to add a caption using the "title" attribute of the anchor. Simple but does the job if you want a caption for your image.
    Patches for the js and css are here:
    http://damoxc.net/patches/
  • Chaffe Barbar · 1 year ago
    I want to be able to assign "onUpdate" events to some of my squeezebox links but not others. Is this doable?
  • dıs cephe · 1 year ago
    thanks hekimboard dıs cephe kaplaması.
  • Eric · 1 year ago
    Anyone else having a problem with the youtube video in IE 7? If the video is playing and you click close, the audio of the video continues after the box has been closed. Any solution for this? Thanks so much for a great box!!
  • s04 · 1 year ago
    Hmm, sometimes the SqueezeBox is just showing the loading indicator and does not show the image. Does anybody know possible reasons for it?
  • dış cephe · 1 year ago
    ı would like to know this too..thank you..
  • McGrelio · 1 year ago
    Hi, is there a way to disable scrollbars in an iFramed Squeezbox? I see no property for that.
    Thanx a lot, great work!
  • McGrelio · 1 year ago
    I found a dirty hack to remove scrollbars from iFramed SqueezBox.
    - edit SqueezBox.js line 371
    - substitute <width: this.options.size.x,>
    - with <width: this.options.size.x -20,>

    A better solution is appreciated :)
    Cya!
  • Roy · 1 year ago
    Depends on the parsing type u use. When you use AJAX, it loads a div with overflow: auto as a styling.
    When you use the iframe method you could add <iframe scroll="no" /> or someting like it. It's just more a styling issue than it is a missing function in the JS.
  • caktux · 1 year ago
    I'm having some problems with the image handler. The first time I click on an image, all I get is the spinner, but after closing the squeezebox and clicking on the image a second, it works. I get that behavior in FF3 and Opera 9.5, and IE6 is always stuck at the spinner.
    No errors in Firebug... I think using the Assets plugin could make this more stable.
  • caktux · 1 year ago
    removing "if (this.isOpen)" at line 341 seems to fix it...
  • rogermbyrne · 1 year ago
    sorry am i being really dumb (probably!) but where are the spinner and close box images with the download?
  • Simon · 1 year ago
    Very nice script, thank you!
    Im just not having any luck getting ajax loaded content to run scripts (like the usual evalScripts: true, so mootools can be used in the loaded content). Any help would be much appreciated.
    Thanks
  • squidliberty · 1 year ago
    I'm having the same problem w/ executing javascript in the modal content. Any suggestion would be appreciated! I tried setting the scripts up as a function and calling them onOpen, but they are sometimes not yet available...

    Also, using percentages for the size option sometimes causes problems.

    Thanks for the impressive work!
  • ClaudeL · 1 year ago
    I solved this one by modifying the script to add a new event called “onAjax”. Then in the onSuccess event on approx line 359 I added “this.fireEvent(‘onAjax’);”

    Of course it would be nicer to solve this by extending the SqueezeBox class rather than modifying it!
  • Chris · 1 year ago
    First of all, thanks for the awesome projects you supply, and the great support you show throughout the posts.

    I have a small question that someone might be able to answer, there's an issue with ajax loaded contents I am yet to solve, it's probably really easy but I can't seem to figure it out.

    I have a page which is static, the links I click load html files through ajax, lets say I click on About, it loads about.html in the div called WindowContents. On this page, there is now an image.

    How would I go about to show this image in squeezebox? when I click it, it just opens the image.
  • Chris · 1 year ago
    Figured this one out after some tinkering, in the OnComplete after the ajax call, I just added the following:
    SqueezeBox.assign($$('a[rel=boxed]'));

    Works great :)
  • asdfg · 1 year ago
    i need open the lightbox with javascript

    thanks.
  • txmo · 1 year ago
    Hi, is 'onClose' working when you close SqueezeBox? it looks that it trashed before fireEvent('onClose').
  • david bowman · 1 year ago
    it's nice. it's even nicer if you preload the images into a hidden DIV instead of having to wait for each image when you click the thumbnail.
  • Kev · 1 year ago
    I'm getting a very strange error when process content using this script in both IE and Firefox. the exact error is: this.parsers[handler] is undefined.

    The script does work on Firefox but i get the error on both browsers (it does not work on IE). Any thoughts?
  • Kev · 1 year ago
    ok, i figured this one out. It is when you try and assign squeezebox onto any elements of a given class instead of to an id.

    I have also notice some crazy behaviour in Firefox 3 where the link is replace with a thumbnail of the image and double clicking on the image opens it in a new browser window (So completely different from how it works on other browsers, even firefox 2!).
  • 3uropa · 1 year ago
    hi, your script is neet and light but i wanted to know how to embed a pdf in the box. i see in your code that you can create a parser and handler for flash. how to do it for a pdf file? thank you
  • Oskar Krawczyk · 1 year ago
    One minor bug: if the content gets loaded to quickly the script breaks never getting out of the 'ticker' state. (Fx 3, Saf 3, Leopard, using full moo-core/more build)
  • syd · 1 year ago
    I seem to be experiencing a similar problem. Sometimes the images get loaded as they should, sometimes the process get's stuck on the loading animation and sometimes the image is shown to soon and is sliding into the squeezebox from the bottom right corner instead of being shown only when the box has resized and opened completely. i get these problems in every browser and inside the same gallery...is there a solution for this?
  • Mike · 1 year ago
    Yeah.. I gotta admit I have the same problem... The ticker stays there if the image loads too quickly. Refresh the page, load the image that is already in the cache, and it is working again...

    Anyone any ideas/help?
  • digitarald · 1 year ago
    so many posts and not one fix ... so I'll continue my search!
  • Joran · 1 year ago
    I'm planning of putting SqueezeBox on a site I'm working on, but I'm running into the same problem as written above. Hope it will be fixed, really like it!
  • Oskar Krawczyk · 1 year ago
    It has something to do with this.asset as every time it returns NULL after SqueezeBox execution the image gets loaded, otherwise it doesn't.
  • richbl · 1 year ago
    Hmmm... I've been getting this problem as well. It occurs on initial loads on all browsers (tested with FF3 under Linux/Windows, and IE7 under Windows).

    Under Windows, the IE7 content never shows.

    Note that my development environment is all localhost, so the theory that the image loads "too quickly" seems to be a valid case.

    Interestingly, however, even on the Squeezebox example site (using Flickr images), I occasionally experience the same script failure.

    This bug is indeed annoying for an otherwise worthwhile script. :/
  • MooFan · 1 year ago
    If I am not mistaken, it may have something to do with xhtml. Check your xhtml for errors. If your xhtml code is not perfect (e.g. start tags that have no corresponding end tags) the script will not work properly. Fix the xhtml and the script works beautifully.
  • wissenwill · 1 year ago
    Don't want the lightbox in the center of the screen. What do I have to do that I can position the box where I want? THX!
  • wissenwill · 1 year ago
    Don't want the lightbox in the center of the screen. What do I have to do that I can position the box where I want? THX!
  • Elijah · 1 year ago
    Thank you for taking the time to work on these tools, great job.

    I'm am trying to open a SqueezeBox via JS. My code: SqueezeBox.fromElement(var_argumentValue, { parse: {handler:'iframe',size:{x:640,y:500}} });
    Looks like everyone else's code. My problem is that the content being displayed is behaving like AJAX and not an iFrame in the sense that it only pulls through the content and not the associative files that come with it. Please help.
  • idealists · 1 year ago
    I have found a really weird problem (bug?) with the latest SqueezeBox (only tested with iframed version) AND the Safari browser (on Windows) v3.1.2. (bug doesn't seem to happen in IE7, Firefox2+, Opera9+).

    When you have multiple iframed squeeze boxes on a page, say 5. Behind 5 different links:
    Link a)
    Link b)
    Link c)
    Link d)
    Link e)

    An example of a scenario that results in the bug.
    Step 1)You first load the page
    Step 2) You click on Link a). then close the resulting iframed Squeezbox.
    Step 3) Then you click Link c). You close the resulting iframed SqueezeBox. Then you click the Safari browser's Reload button.
    Step 4) You then click Link e). You will find that Link a) link is actually triggered (which was the first click on Squeezebox prior to the page reload - as per Step 2). Close the iframed Squeezebox.
    Step 5) You then click Link d) - again some problem.

    If you come up with a fix for this, please post here and email me.
  • ClaudeL · 1 year ago
    I solved this one by modifying the script to add a new event called "onAjax". Then in the onSuccess event on approx line 359 I added "this.fireEvent('onAjax');"

    Of course it would be nicer to solve this by extending the SqueezeBox class rather than modifying it!
  • ClaudeL · 1 year ago
    Doh! Sorry was replying to a comment down the page not creating a new one...
  • arsh · 1 year ago
    How about the images?? They don't appear for donwloads.
  • Alenko · 1 year ago
    is it posible to trigger a window from an onclick event like manualy .Can you write up a sample please :)
  • Idealists · 1 year ago
    Who were you replying to? Me (Idealists)?

    Update: Now the Google Chrome browser is out..I tested it (as it also uses WebKit, like Safari) and yes this problem is happening in Chrome too.
  • kabe243 · 1 year ago
    its happening in safari on mac too...
  • xavier · 1 year ago
    @digitarald, @txmo there is a bug that prevents onClose event to be fired in function 'close': this.trash() must be called "after" this.fireEvent('onClose') and not "before" because trash reset all events
  • digitarald · 1 year ago
    will be fixed, thx for posting
  • Idealists · 1 year ago
    Can you fix the Safari/Google Chrome, bug that I mentioned earlier too.
  • Alenko · 1 year ago
    im using SqueezeBox.fromElement('#EditPostContent', { size:{x:400,y:400},handler: 'adopt' } );
    to grab the data drom a div,but as its done in the example it only grabs the content once! Is there a way that i can allways grab the content every time i click the button? please help
  • Ilkka · 1 year ago
    onShow doesn't get fired a lot of the time (90%) for the ajax box. Any ideas about this? Where is onShow assigned in the code (couldn't figure out)?
  • Michael Stock · 1 year ago
  • Mark · 1 year ago
    Amazing work thank you! I have been looking for a mootools based lightbox that displays various media and iframes, this works perfectly! thanks!
  • Alenko · 1 year ago
    ok can anyone tell me when i use get the content from an existing element with the adopt option why does is show only once and on the second time it it doesnt show the content Please i would really aprritiate an anwser couse im a little bit stuck on this :)
  • Mois · 1 year ago
    Hi, congrats for the awesome box, it really is the best one I tried from several, and thanks.

    I would like to ask if there is a way to reference the calling element (anchor) inside the handler function. Specifically, I want to use some details about the firing element in the ajax data that is being sent to the box.
  • Mois · 1 year ago
    I am assigning the box to an array ($$)
  • Mois · 1 year ago
    Disregard my questions above. I fixed it, basically by creating custom 'assign' function which iterates through the array of elements and assigns fromElement for each element's 'click' event.
  • Jörn · 1 year ago
    Hi Harald,
    onShow doesn’t get fired a lot of the time (90%) for the ajax box.

    Did you fix it?
  • Sjon · 1 year ago
    passing a zIndex as option to SqueezeBox.assign won't work since assign() calls this.initialize > this.build() before merging options; and therefore uses the wrong value for it's zIndex
  • Sjon · 1 year ago
    There is an ugly solution; paste the following after this.initialize() in fromElement():

    `this.overlay.style.zIndex = this.win.style.zIndex = this.options.zIndex;`
  • Juan · 1 year ago
    if you fire the 'ajax requests' demo box and then scroll over it, something really weird happens.
  • Tim Lavelle · 1 year ago
    Morning!
    I have a weird issue with this. When I open an iframe which contains some flash content and then close that iframe, the flash can still be heard playing. Happens in IE6... has anyone else seen this?
  • Kent · 1 year ago
    Hi Tim,

    I finally found the answer... been struggling with this one too.
    Add this line to the top of "trash: function() {"

    this.content.empty();

    that forces the container to dump whatever it has inside.
  • Tim Lavelle · 1 year ago
    Awesome!!! Thanks Kent! That really helps me out!!!
  • Ben · 1 year ago
    Hey,

    I'm using SqueezeBox but when i press the X to close it the window beneath it doesn't reload. Is it possible to fix that?

    Greetz,

    Ben
  • nopicnic · 1 year ago
    Hi,

    I can't get "onSubmit" to fire in IE6. It works fine in FF. Does anyone else have this problem? Any sugestions?

    Thanks,

    Niklas
  • nopicnic · 1 year ago
    I load the content with ajax. I do "evalScripts" and "evalResponse"

    /Niklas
  • dave · 1 year ago
    Hi and many thanks for this package
    How I can close the loaded modal page with a link in the loaded modal page?
    When user clicks on a link (which is supposded to do an important job) I load a modal yes/no page with squeezbox and when user click yes it goes to desired page and when he clicks on "no" link I want to close the modal page. But I can't figure it out how I can close the modal box from within the loaded modal page.
  • Derek Lawrie · 1 year ago
    call the close function, so if your page is an iframe youd put this in the "no" link:

    [code=js]onclick="parent.SqueezeBox.close();"[/code]

    doesn't need to be applied using onclick of course, probably best to script that to an id on the link.
  • Derek Lawrie · 1 year ago
    Sorry wrong code formatting :)



    call the close function, so if your page is an iframe youd put this in the “no” link:

    `onclick=”parent.SqueezeBox.close();”`

    doesn’t need to be applied using onclick of course, probably best to script that to an id on the link.
  • dave · 1 year ago
    Many thanks, It solved my problem.
  • thejigsaw · 1 year ago
    Can someone point me to a download link of some older version of squeezebox because i have a huge project, which is written with mootools v1.11 and because of a time constrains i can't afford to rewrite the whole project... please....
  • Derek Lawrie · 1 year ago
    Thanks for this, easily the best of the lighboxes that I've used.

    Is there any way to resize the squeezebox from one iframe page to another for different sized content?
  • Tim Lavelle · 1 year ago
    Still can't figure out why "nothing" in the onClose paramater fires?

    ie:
    SqueezeBox.assign($$('a.boxed'), {
    parse: 'rel',
    size: {x: 950, y: 669},
    onClose: { url: baseURL+'training.php' }
    });
  • Tim Lavelle · 1 year ago
    This is most likely a bug in SqueezeBox with IE6. Flash content loaded in an IFRAME still plays after you close the SqueezeBox window...
  • james · 1 year ago
    Hello, good script but...
    1) is there any documentation?
    2) has anyone experienced any overlay transparency issues when opening SqueezeBox over Flash? Basically, my main page is all Flash (filling entire page) and no matter how I set the 'overlayOpacity' value in SqueezeBox, the overlay is always black.
  • Markus · 9 months ago
    Hi James,
    did you found a solution to that problem? I am having the same issue :-|
  • dış cephe · 1 year ago
    teşekür eder saygılar sunarım.
  • Enrico · 1 year ago
    Maybe a dummy question, but I'm unable to show by js the box... It works perfectly assigned to events, but I'd like to show up it js request, for integrating a photo choose in tinymce...

    I just need to have the box showing (overlaying the page) by js. Any hint?
  • Fox · 1 year ago
    Hello! Lovely box. I'm facing some trouble in deploying it though. On ie6, images don't load until I click on the link twice (even on the demo on this site). It seems that code telling the box to resize and display the picture is not fired when the image is fully loaded. The code works perfectly in Firefox & Safari though. Is there a workaround for ie6?
  • squarepusher · 1 year ago
    <button onclick="parent.SqueezeBox.close()">OK</button>

    inside my popup box

    doesn't work in IE, but does in FF???????????
  • Ivan · 1 year ago
    This is a great piece of code. Thanks. It's very useful. I managed to get it to work in my setup. However I have one problem. The X (in a circle) button on the top right doesn't show. Is there a configuration parameter that I need to set? Thanks.
  • r3lay · 1 year ago
  • Ivan · 1 year ago
    Thanks r3lay. How do I make it appear at the top-right partially outside the content box as in the demos?
  • Ivan · 1 year ago
    Got it. SqueezeBox.css. Thanks.
  • waitangi · 1 year ago
    great script, i have 2 questions:
    - adding 'nofollow' in the 'a' link for an iframe window seems to break it (doesn't load)
    - is there any way of getting another mootools script to work inside an opened (non-iframe) box? specifically a calendar (www.electricprism.com/aeron/calendar/)...
    thanks folks
  • Ivan · 1 year ago
    I have squeezebox running perfectly on IE6/7, Firefox 2+, Safari but I have a problem on Opera (v9.27 Build 8841). Flash content remain on top and therefore covers the iframe I'm opening via squeezebox. Would appreciate any suggestions to solve this.
  • Ivan · 1 year ago
    Problem solved. Add ' so.addParam("wmode", "transparent"); ' in your instance of SWFObject.
  • Antoine · 1 year ago
    Hi,

    First, thank you for this good project. It works perfectly.

    I have a question: is it possible to put easily a comment under the picture (using Alt tag for ex) ?

    Thx,

    Antoine
  • LM · 1 year ago
    hi, Harald, your projects is awsome, mootools is incedible awsemo, i like it much more then other frameworks, but i want to know. is mootools critical for perfomenens(animation for exemple), cuz many scripts works so slowly :( (IE of couse,..), but in other labs its sometimes more slowler. so which of mootools version faster (actually for animations). maybe it posible too make code faster? any tips etc ?

    and... i'm so sorry for my engish :(

    thanks
  • Bartolomé · 1 year ago
    Bug: If the user closes the lightbox BEFORE an ajax call is completed, the lightbox closes but pops up again when the ajax request is finished.
  • Viro · 1 year ago
    Hi I got a problem,
    I can't figure out how to make some function execute onClose?
    I want to setup that event after the squeezebox has been initialised...

    Can any one please help me with that.
  • Eric · 1 year ago
    Sometimes the images won't load in IE 7. I even tried and found the same problem on the images section on here. The horizontal image would not load and then some of the other images would not load aferwards. This is only happening in IE, Firefox seemed fine. Any ideas?
  • Tommy Boy · 1 year ago
    hi. thanks for the excellent script. It has made my site a great improvement. But I am have just a little issue and was wounder if you or anyone else could help me out. When loading am image most of the time it just sits on the loading gif/graphic but doesn't show the picture. But if i were to refresh the page, BAM! it shows. lol Been trying to figure this out for a whle now. can you please assist me with this issue?

    Thanks a ton in advance.
  • Tomas · 12 months ago
    Great script, but it does not show images on IE, any ideas ?
  • Tommy Boy · 1 year ago
    hi. thanks for the excellent script. It has made my site a great improvement. But I am have just a little issue and was wounder if you or anyone else could help me out. When loading am image most of the time it just sits on the loading gif/graphic but doesn’t show the picture. But if i were to refresh the page, BAM! it shows. lol Been trying to figure this out for a whle now. can you please assist me with this issue?

    Thanks a ton in advance.
  • Frosty · 1 year ago
    great tool !
    One question. I have a site page in a frame that I would like to use it in. However when I load it in IE6 it seems to use the entire window size to calculate center and not the frame size. So if i have 2 frames side by side frameleft and frameright and I want the iframe in frameright it falls off the side of the browser. It centers fine in IE7/Firefox but not IE6.
    Is there a workaround for this ?
  • Göğüs estetiği · 1 year ago
    For those of you thinking that if they implement this it will eliminate some of the waiting and lines…
  • pnq · 1 year ago
    Hola!

    Using sorttables breaks SqueezBox (when closing).

    http://www.kryogenix.org/code/browser/sorttable/
  • Jan Oliver · 1 year ago
    Hey there.

    I started using squeezebox today and it works fine.

    Now i want to show a form inside the box which then leads to a "form.send" function of mootools.

    unfortunately "$('regform')...." is not working, even if i call it while the box is open.

    I don't really want to use iframes, is there any other possibility to get this to work?

    Regards
  • oyun · 1 year ago
    Thanks you really perfect one writing.I m always follow you.
  • yecine06 · 1 year ago
    Hello,
    Thanks for this great script

    But i have a question, is it possible to open a lightbox with javascript.

    Because i want to open it on an onclick event on a cell table (td)

    thanks for your help
  • perrohunter · 1 year ago
    Yes it is possible, for what I've seen you can doit by doing this

    SqueezeBox.fromElement($('div-id'), {size: {x: 500, y: 300}})
  • Christian · 1 year ago
    Hallo Harald,

    danke für das großartige SB-Script! Ds ist eine super Sache und erleichtert meine Arbeit ungemein!

    Ich hätte zur Funktionalität eine Frage:

    Wäre es auch möglich, dass man ein Link-Element baut (und versteckt) und dieses beim Laden der Seite automatisch aufrufen lassen kann?

    Ich bräuchte quasi ein automatisch öffnendes Popup, wenn die Seite geladen wurde.

    Gibt es dafür eine Möglichkeit?

    Vielen Dank für die Antwort,
    viele Grüße Christian
  • perrohunter · 1 year ago
    I can't get FancyUpload to work with SqueezeBox, any suggestion on this ?
  • Thomas · 1 year ago
    Hi,

    I can't get the squuezebox to work for youtube urls when I build the elements dynamically.

    I use mootools to pull my youtube data from a database using JSON and then build links dynamically using the code below. When I click on the link, I only get a white box without any youtube video in it.

    If I was to hardcode the youtube url into my code (replace data.Play with a youtube url) it works fine, but not when I build it dynamically. Any ideas why?

    var playContainer = new Element('div', { 'class': 'play'});

    var playLink = new Element('a', {
    'href': data.Play,
    'class' : 'boxed',
    'rel': '{url:\'' + data.Play + '\',handler:\'swf\',size:{x:425,y:350}}'
    }).inject(playContainer);
  • perrohunter · 1 year ago
    Try loading your Videos with Swiff from mootools =P

    goodluck
  • Thomas · 1 year ago
    I will give this a shot but why do you think this will solve the problem? Have you encountered this before?
  • perrohunter · 1 year ago
    Yes, however i forgot to tell you that you need to still have the
    tag with the ID somewhere maybe hidden
  • perrohunter · 1 year ago
    Ok, let me explain a little further:

    As usual u still need to add the 'a' tag with the rel="boxed" and the href pointing to the target image,site or div. You might hide it with a style or something, let's suppouse I got my link here like this:


    Then to active this from javascript I'd have to execute this command:

    SqueezeBox.fromElement($('mysiteSquee'), {size: {x: 800, y: 400}});

    thats it ={
  • perrohunter · 1 year ago
    Argh ! I can't get the sample link to display properly on the comments , so instead of lesstahn and more tahn symbosl im going to use parenthesis

    (a href="mysite.html" rel="boxed" id="mysiteSquee" style="display:none;")My link(/a)
  • Thomas · 1 year ago
    I don't really understand. Where in all this does Swiff get involved?
  • perrohunter · 1 year ago
    LOL, sorry, i thought I was replying to other comment made by another guy, sorry for the inconvinience.

    What I meant is, when You load a flash object over Ajax, usually the browsers don't load it properly, to sole this, within the mootools library , theres a swiff object that solves this issue. so I you'd like to have a youtube video displaying on the SqueeBox you should evaluate it with Swiff.

    After you build your Links dynamicalley just execute again the squeezebox code
    that shoudl fix your problem =P
  • Thomas · 1 year ago
    Can you demonstrate using some sample code? In my case I am loading a list of 50 youtube videos through JSON. So for everyone I need to do (the data.Play contains YouTube links):

    var obj = new Swiff(data.Play);

    How do I then pass this into squeezebox? Do I use?

    SqueezeBox.fromElement(obj, {size: {x: 800, y: 400}});

    The most importantly how do I connect this to a href on the page? Each of the 50 rows of data will have a href so when it is clicked I the squeezebox should be launched to diplay the corresponding video.

    Thanks for all your help.
  • Ricks · 1 year ago
    I'm trying to resize the modal window on a browser resize, ie...

    window.onresize = function () {
    SqueezeBox.resize({size:{x: document.documentElement.clientWidth-150, y: document.documentElement.clientHeight-150}})
    };

    I've been setting the size of my box using document.documentElement.clientWidth/Height commands and it works well on launch, but I want it to adjust to the size of the window on resize.
  • Thomas · 1 year ago
    Harald,

    Thanks for this script, it is exactly what I am looking for. It works great when I use the samples from this website. However, can anyone explain to me why this code won't work:

    SqueezeBox.parsers.swf = function(preset) {
    return (preset || this.url.test(/\.swf/)) ? this.url : false;
    };

    SqueezeBox.handlers.swf = function(url) {
    var size = this.options.size;
    return new Swiff(url, {
    id: 'sbox-swf',
    width: size.x,
    height: size.y
    });
    };

    window.addEvent('domready', function() {

    var myDiv = $('test');

    var myLink = new Element('a', {
    'href': 'http://www.youtube.com/watch?v=QCVxQ_3Ejkg',
    'class': 'boxed',
    'rel': '{url:\'http://www.youtube.com/watch?v=QCVxQ_3Ejkg\',handler:\'swf\',size:{x:425,y:350}}',
    'text': 'those lucky'
    }).inject(myDiv);

    SqueezeBox.assign($$('a.boxed'), {
    parse: 'rel'
    });
    });

    It's basically the same code as the sample, the only difference is that I am creating the link using javascript and injecting it into a div, then assigning the link to the Squeezebox object.

    Why does this not work?
  • gawy · 1 year ago
    I'm having problems getting SqueezeBox to work with .png files. It will load the file forever without displaying it.

    The only way to get it to display a png file is to load the png file once from another window so the computer caches it, and after that the squeezebox are able to display it.
  • Göğüs estetiği · 1 year ago
    For those of you thinking that if they implement this it will eliminate some of the waiting and lines…
  • Rob V · 1 year ago
    Is there anyway to specify the size dynamically?
    Ie - I have 5 links on a page - each one pops a squeezebox.
    Do I have to do 5 assigns in the script section? or can I just do something like
    Sign up now!

    Or something along those lines?
  • me · 1 year ago
    is there anyway to auto resize?
  • me · 1 year ago
    and how can i set bgcolor ?
  • Marcelo · 1 year ago
    I can`t make this work. the firsth time don´t show the image, but at the second time yes. What happen?
  • Marcelo · 1 year ago
    Again, when i testing in my localhost the imag do not load it is a problem or this work when i put the real http direction?
  • Razvan Girmacea · 1 year ago
    in IE6 I get an ERROR and closes window ....
  • huzurevi · 1 year ago
    I’ve been setting the size of my box using document
  • huzurevi · 1 year ago
    I use mootools to pull my youtube data from a database using JSON and then build links dynamically using the code below
  • isitme cihazı · 1 year ago
    I use mootools to pull my youtube data from a database using JSON and then build links dynamically using the code below
  • konteyner · 1 year ago
    Is there anyway to specify the size dynamically
  • tabela · 1 year ago
    is there anyway to auto resize
  • surucu kursu · 1 year ago
    hi, thanks
  • Tim Lavelle · 1 year ago
    Not sure if I am just missing something here, but is there a way to have SqueezeBox popup from a form submission?

    I feel like I've been trying but have epic failure.

    =(
  • how to make money online free · 1 year ago
    I'm gonna try this one out, I need a lightbox for squeeze page
  • AD · 1 year ago
    I've got the code to present a lightbox Ajax login form, however any web pages gets presented in the actual lightbox.

    I would like a successful login to break out of the iframe and actually force redirect to the "login" page.

    How do I do this with SqueezeBox?

    Thanks
  • Name · 1 year ago
    > <a href="javascript:;" onclick="parent.SqueezeBox.close();">Close iFrame
  • AD · 1 year ago
    This will only close the iframe if onclick. However, this is not what I'm after.

    Here's what I'd like SqueezeBox to handle;

    1. User visits a page with a "login" hyperlink, and clicks on this link.
    2. A lightbox squeezebox is presented. The contents of which are a "login" form.
    3. The lightbox will capture any errors, such as a bad username, or a bad password and present them inside the lightbox.
    4. The lightbox will close if there are no login errors and redirect the page (in part 1) to the "user home" (or dashboard) page.
  • kevin · 1 year ago
    hi, this is great work but i wondering how can I Automatically start SqueezeBox once the page load?
  • Money · 1 year ago
    It does not work in Chrome and Safari.Why?Thanks!
  • Money · 1 year ago
    http://www.zovue.com/aristastyle/index.html
    This is my website.Thanks a lot!
  • otomatik kapi · 1 year ago
    Is there anyway to specify the size dynamically
  • Tim Lavelle · 1 year ago
    After multiple posts, comments and emails, I haven't seen him post here in at least 3 months. It's a simple question, lots of ppl over the web wonder the same thing I do, but no responses.

    Glad I donated $100 worth of books and shipped them over seas, and that was about 6 months ago.
  • Carlos A. Cabrera · 1 year ago
    First of all. Thanks for such a good script! I'm currently using Squeeze Box with Iframe Content. My problem is in getting a transparent background with IE. It works perfect with FireFox, but when I try it with Internet Explore 6 , it gives me a nasty white background. I tried techniques used with iframes, and I actually others iframes placed normally with <iframe> with transparency. The problem is when I call the iframe with handler: 'iframe',... is there a way to fix this.

    Thanks!
  • Tim Lavelle · 1 year ago
    IE6 Trash Function fixed was provided by Kent in earlier comments... Maybe an update on the next version...

    add this line to the top of the trash: function()

    this.content.empty();
  • R.Trentin · 1 year ago
    Hi!
    Thanks, Harald, for great projects...

    Just to inform: I was facing problems with iframe in IE7, on which content wasn't appearing... It was corrected downloading the last MooTools version (1.2.1).

    Cheers.
  • Max · 1 year ago
    Hi Harald!

    Thancks for your great tools !

    I like the squeezebox a lot but i wonder if its possible to launch the squezzbox without clicking on anything, like in the onload method on the body...

    can you help for this please.

    Thanks again..

    Max
  • kulak burun boğaz · 1 year ago
    Is there anyway to specify the size dynamically
  • kabin · 1 year ago
    is there anyway to auto resize
  • Max · 1 year ago
    Hi Harald!

    Thancks for your great tools !

    I like the squeezebox a lot but i wonder if its possible to launch the squezzbox without clicking on anything, like in the onload method on the body…

    can you help for this please.

    Thanks again..

    Max


    !! PLEASE HELP !!

    please please please please please please : /
  • Jako · 11 months ago
    In example code there ist an error:

    `window.addEvent('domready', function() {`

    instead of

    `window.addEvent('domready', {`
  • Marcelo · 11 months ago
    Hi i have a problem just display the image at the second click in Mozilla Firefox an in IE never show the image.
  • Marcelo · 11 months ago
    Hi I find it!!! and fix it:

    just i put this code at image case in the handlers extender an it work fine!!

    function(url) {
    this.image = new Image();
    var events = {
    loaded: function() {
    var win = {x: window.getWidth() - this.options.marginImage.x, y: window.getHeight() - this.options.marginImage.y};
    var size = {x: this.image.width, y: this.image.height};
    for (var i = 0; i < 2; i++)
    if (size.x > win.x) {
    size.y *= win.x / size.x;
    size.x = win.x;
    } else if (size.y > win.y) {
    size.x *= win.y / size.y;
    size.y = win.y;
    }
    size = {x: parseInt(size.x), y: parseInt(size.y)};
    if (window.webkit419) this.image = new Element('img', {'src': this.image.src});
    else $(this.image);
    this.image.setProperties({
    'width': size.x,
    'height': size.y});
    this.applyContent(this.image, size);
    }.bind(this),
    failed: this.onError.bind(this)
    };
    (function() {
    this.src = url;
    }).delay(10, this.image);
    this.image.onload = events.loaded;
    this.image.onerror = this.image.onabort = events.failed;
  • roberto · 11 months ago
    i've an error with your code... :(
  • Marcelo · 11 months ago
    Hi
    I forget it, the function addEvent must be redefined like that

    window.addEvent('domready', function() {
    SqueezeBox.assign($$('a.boxed'), {parse: 'rel'});
    });

    I so sorry.
  • bat · 11 months ago
    same problem...
  • milos · 11 months ago
    How can you display a title of the box?
  • User · 11 months ago
    The documentation you provided is insufficent!!!
  • micky · 11 months ago
    where's the closebox image?
  • VIRT · 11 months ago
  • confiq · 10 months ago
    Its not working well with "SmoothScroll" :(
  • Alanu · 10 months ago
    Hi,
    I've got a little problem under IE6.
    My box open in page which contains Java Applet... And this applet appears in the SqueezeBox !
    How can I do ?
    It's ok under firefox... Z-Index problem or what ?

    Thanx in advance
    Alanu
  • David · 10 months ago
    i'm a french and i have a problem on Google Chrome navigator with accents. For example, when i try to put é in HTML, i have this error :
    "Entity 'eacute' not defined"
    Can you help me please ? Thanks by advance.
    PS : no problem with IE or Firefox.
  • kabe243 · 10 months ago
    i'm still having an safari only issue where the following happens:

    1) i open a few different squeezeboxes. all of them are working with iframes. each time i open one, a different html file is loaded into the iframe.

    2) i reload the whole page that contains the links that open the squeezeboxes.
    i open a squeezebox and close it again.
    now it gets weird: whenever i open another squeeze box, the content of the iframe is the first page i opened after the reload...

    i check through the whole squeezebox.js and the source url of the iframe allways seems to be right, but still the wrong content is loaded.

    makes me think that this might be an issue with mootools itself??? i don't know enough javascript to be able to find out.

    any ideas would be appreciated.

    cheers
  • Spence Kiddle · 10 months ago
    Here is a solution for launching a SqueezeBox instance when the 'domready' event fires. This method does not require you to change the SqueezeBox class. If someone has a better method please share.

    JS:
    window.addEvent('domready', function(){
    SqueezeBox.assign($('launcher'), {options});
    $('launcher').fireEvent('click');
    });

    HTML:
    <div id="launcher"></div>

    CSS:
    #launcher{display:none;}
  • Asdrubale · 10 months ago
    for images which don't load on IE

    line 345, I changed
    if (tmp && tmp.onload && tmp.complete) tmp.onload();
    in
    if (tmp && tmp.onload && !tmp.complete) tmp.onload();
    now it works in ie6 ie7 but not ff and opera lol
    i'll put a sniffer and go to hell
  • Tom · 10 months ago
    Hi, it look very nice.
    Can someone explain me how to open it when the page load, please. It would be much apreciated
  • digitarald · 10 months ago
    How to open an element on domready:

    window.addEvent('domready', function() {
    SqueezeBox.fromElement(new Element('div', {html: 'Hello World, maybe more content'}));
    // or
    SqueezeBox.setContent('string', 'Hello World');
    // or
    SqueezeBox.setContent('clone', $('my-hidden-message'));
    });

    Does it work for you?
  • Erik · 10 months ago
    Is it possible to open squeezebox from a link in an iframe and still cover the whole page (parent)?

    Really need help! Love this script and wan to use it.

    Erik
  • Tyler Craft · 9 months ago
    Apologies for the double post. I just realized I commented on one of the last posts in the thread. And since it's a bug, I thought I'd make sure it was visible and not hidden.

    Anyhow, what happens is when I click on a link to an image (in IE 6/7, FF 2/3, Safari 3) I just get the preloader. If I close the lightbox, and click the link again, it works fine. If i refresh the page, it works fine. If I clear my cache and refresh the page then the issue happens all over again.

    I'm using this as part of a CMS I'm building. In order to try to find the issue I removed all unnecessary JS code (ie, only my general js and mootools) and it worked fine. Once I included the tinymce 3.2.1.1 js include... the issue started occurring again.

    I'm by no means suggesting the issue is with your script - however, it's a lot easier to try find the issue in your script than in tiny.
  • digitarald · 9 months ago
    New version this week *big announcement in a small comment posting* ;)
  • Erik · 9 months ago
    Sounds great. Will this new version address the ability to open Squeezebox from a child iFrame into the parent page? I'm really hurting for this ability. Really stuck.
  • YIHUNG · 9 months ago
    How do I put these codes in an external js file:


    <script type="text/javascript">
    /* <![CDATA[ */

    SqueezeBox.parsers.swf = function(preset) {
    return (preset || this.url.test(/\.swf/)) ? this.url : false;
    };

    SqueezeBox.handlers.swf = function(url) {
    var size = this.options.size;
    return new Swiff(url, {
    id: 'sbox-swf',
    width: size.x,
    height: size.y
    });
    };

    window.addEvent('domready', function() {

    /**
    * That CSS selector will find all elements with the
    * class boxed.
    *
    * The second argument sets additional options
    */
    SqueezeBox.assign($$('a.boxed'), {
    parse: 'rel'
    });

    });
    /* ]]> */
    </script>

    THANKS!
  • Chris · 9 months ago
    I seem to have a problem when trying to view an image but only the first time I click. I get the spinner for ever. If I close the squeezebox and reclick it opens no problem.

    I tried the solution posted here (remove if (this.isOpen) on line 341) but it doesn't work.

    It seems that when I the image I try to open is the same as the thumbnail I click on it opens fine. As soon as I change the name of the large image this problem occurs. Maybe something related to loading of images?
  • digitarald · 9 months ago
    Is fixed in rc3, released yesterday.
  • agdolla · 9 months ago
    Unfortunatelly it's still the same.
    The problem imho is that the onload event of the Image is somehow gets lost.
    Image onload does work under IE6 usually....
    But in this case the onload function is not called.
  • Erik · 9 months ago
    I just updated my website with your new release and everything is messed up. NO DARK TRANSPARENT BACKGROUND and MORE SCROLLBARS!!!!
  • digitarald · 9 months ago
    Link to the example page, would make testing and fixing easier.
  • Erik · 9 months ago
    I have a row of flag icons on the lower left corner of my webpage: http://www.honestskin.com/home.htm
  • Erik · 9 months ago
    The prior release worked better. The only problems I had was a horizontal scrollbar with the dark window in Safari, rounded corners in IE, and transparency issue with Opera.
  • digitarald · 9 months ago
    Should be fine now, I updated the CSS file. I have no shadow planned for IE6 and no rounded corners for any IE6 and 7.
  • Erik · 9 months ago
    I just discovered another problem. It appears the side scrollbar for the parent page disappears once you initiate the squeezebox. After you click to close the squeezebox, the parent page scrollbar DOES NOT RETURN. THIS IS MAJOR.

    I tested your iFrame example above and the same problem occurs.

    Any possible fix for this?

    Erik
  • Erik · 9 months ago
    I like to know if you have a fix for the iFrame problem: No parent scrollbar after the close. If the squeezebox is located down the parent page, I need a scrollbar back? YOUR DEMO DOES THE SAME !!!
  • ieminx · 9 months ago
    how to use submit a form inside squeezebox (prevent load new page) and the result still in that squeezebox?
    just like submit form using mootools without loading new page...
  • ieminx · 9 months ago
    ahh forget it...just found it, my stupidity :D
  • jon jackson · 9 months ago
    Nice piece of work - Gracias.

    I have 1 question regarding using the adopt method. Can you give me any help regarding how I can use this method more than once.

    I am using your code in a login modal box. However I want to trigger the modal box from multiple links in my code. If the user closes the box after the first trigger and then clicks on another link the box is obviously empty.

    I need to use adopt since I have events added to submit buttons etc in the form.

    Hmm - I have tried playing for a while now but cant get any further.

    Any help is very appreciated.

    regards
    Jon
  • jon jackson · 9 months ago
    Hmm - Lo Siento for the duplicat epost.

    I just had a thought - when you have form elements that you wish to adopt into the SqueezeBox - and which have events attached to them --> you could maybe build the form elements on the fly and attach the events as you build it.

    Jon
  • Alexander · 9 months ago
    Hi. how does the parameter resizeFx { } works ?
  • Alex · 9 months ago
    Hi,
    is there a way, that the script automatically detects the size of the loaded document, when loading via AJAX. I have the problem that I'm loading dynamically created content, and thus I don't know the exact size of the content. I also want to prevent scrollbars on the sides of the sqeezebox.
  • Chris · 9 months ago
    Thanks for the image loading fix.

    I have a new problem with your new release. It seems that some of my thumbnails have white spots on them, not all of the thumbnails only some. Then if I click on them I see the large image with the white spots and then the white spots disappear within 0.5 sec. I had this problem with lightbox before but it only did it for 1 image.
  • jon jackson · 9 months ago
    Hi Harold


    Do you have any suggestion as to how you might attach events to form elements inside the SqeezeBox?

    As far as I understand - cloned content has events removed and adopted content can preserve events but can only be called once.

    I would like to call the SqeezeBox multiple times without a page refresh.


    regards
    Jon
  • Tom · 8 months ago
    Hi Jon,

    did you find a solution for your problem?
    I tried also to get mootoos to work within the page loaded into the SB. Normal Javascript works without problems, but Mootools doesn't. Until now I couldn't figure out how to do it.

    Tom
  • Chris · 9 months ago
    I also noticed that the css doesn't validate
  • Jepedo · 9 months ago
    Hi digitarald,

    Great job with squeezeBox. I noticed that the hiding of the parents scrollbar does not work properly in Safari 3+ and Chrome. After some digging I realized that getSize() includes the space below the scrollbar in both those browsers. It appears to be a mootools issue. This makes the margin-right not set and then when you close the window the scrollbars do not reappear. This seems to be another issue as even when I hard coded the right margin the scrollbars would not reappear. Still looking for a fix and will let you know if I can figure it out.
  • Estelle · 9 months ago
    Hi,
    Thanks for this script.
    I don't if someone has already post this subject : I would like to do a galery with all my pictures and not display just a single picture. How I can do that? What do I need to add to the script?

    thanks a lot
  • Arlifax · 9 months ago
    I was having a problem with version 1.1 of Squeezebox with Mootools 1.2.1. I was receiving the error 'Fx.Transitions is not a function' this was for line 103 of the script.

    I changed the line of code from
    transition: Fx.Transitions.Quint.easeOut,

    to read
    transition: 'Quint.easeOut',

    I hope this helps someone and if needed gets placed into and update version of SqueezeBox
  • Marie-Hélène · 9 months ago
    Hi,

    I would like to know how to add a title in the squeezebox like this picture : http://gueschla.com/posts/mootools_plugins/sque...

    Thanks you!!!
  • Jess · 8 months ago
    Hi-- first, thank you so much for this.

    Is there a way to initiate an ajax request on the parent page upon closing the Squeezebox window? I'm using the box to update content on the parent page and I want to be able to load the new content in without a page refresh.

    Thanks! Jess
  • Chris · 8 months ago
    any answer to my white spots problem?
  • Loko · 8 months ago
    Hi. This is a great script, by the way. I use it on many of my websites, so thank you!

    I am currently working on a site that uses the mootools accordion. There seems to be a conflict and I'm unable to use both scripts, just one or the other. Any thoughts as to why?

    The particular page in question is currently (note, that it will not always be at this URL) at http://www.pactec.org/index.php?id=64.

    Thanks again.
  • Loko · 8 months ago
    I figured out that one of my javascripts was wrong. Fixed it and it's working great now.

    As a follow up, on the 'from elements' section, how do I hide the div on the page and only show it in the squeezebox? I tried adding style (display:none), but it also hid the element in the squeezebox. Any help would be appreciated.
  • Sam · 8 months ago
    hi there,

    where can i find the docs for the latest version of squeezebox?

    thank u
  • Kent · 8 months ago
  • Kent · 8 months ago
    oops the comment filter removed something.... in last line of paragraph 2 "including tags" should be "including BR tags"
  • Sean · 8 months ago
    There was a bug with the disappearing scroll bar in Safari 3. When SqueezeBox was closed the scroll bar would not automatically reappear.
    I made a fix for it. The fix may not be ideal, but it works. (at least where I have tested it)

    toggleOverlay: function(state) {
    var full = this.doc.getSize().x;
    this.overlay.setStyle('display', (state) ? '' : 'none');
    if (state) {
    this.doc.body.addClass('body-overlayed');
    this.scrollOffset = this.doc.getWindow().getSize().x - full;
    this.doc.body.setStyle('margin-right', this.scrollOffset);
    } else {
    if (this.doc.body.getScrollSize().y>this.doc.body.getSize().y) {
    this.doc.body.addClass('body-visible');
    }
    this.doc.body.setStyle('margin-right', '');
    }
    },

    then you need to add this class to the css

    .body-visible {
    overflow-y: scroll;
    }
  • Sean · 8 months ago
    the formatting was weird on that post, hopefully this attempt show sup better.

    toggleOverlay: function(state) {
    var full = this.doc.getSize().x;
    this.overlay.setStyle('display', (state) ? '' : 'none');
    if (state) {
    this.doc.body.addClass('body-overlayed');
    this.scrollOffset = this.doc.getWindow().getSize().x - full;
    this.doc.body.setStyle('margin-right', this.scrollOffset);
    } else {
    if (this.doc.body.getScrollSize().y>this.doc.body.getSize().y) {
    this.doc.body.addClass('body-visible');
    }
    this.doc.body.setStyle('margin-right', '');
    }
    },
  • Sean · 8 months ago
    not sure why the line breaks aren't showing. here is one last try. This script also has an added fix.

    toggleOverlay: function(state) {
    var full = this.doc.getSize().x;
    this.overlay.setStyle('display', (state) ? '' : 'none');
    if (state) {
    this.doc.body.removeClass('body-visible');
    this.doc.body.addClass('body-overlayed');
    this.scrollOffset = this.doc.getWindow().getSize().x - full;
    this.doc.body.setStyle('margin-right', this.scrollOffset);
    } else {
    this.doc.body.removeClass('body-overlayed');
    if (this.doc.body.getScrollSize().y>this.doc.body.getSize().y) {
    this.doc.body.addClass('body-visible');
    }
    this.doc.body.setStyle('margin-right', '');
    }
    },
  • Shlomikalfa · 8 months ago
    Hi,
    This script looks amazing !!!

    But why doesn't it have a gallery mode with "Next" & "Previous" images display too ?!
    too bad cause that's the only thing preventing me from using this great script at http://www.e-lephant.org and i am surely not the only one....
  • Tim · 8 months ago
    I've spent a few hours trying to find a resource on how to activate the Squeezebox overlay from within a SWF file... but I haven't been able to find anything.

    Has anyone done this, or know of a link that talks about doing this effect?

    Thanks!
  • ziozec · 8 months ago
    how is it possible to open a squeeze box from an onClick event?

    i need this, because i have to pass different parameter to the loading url and i can't use tag to define the url..

    so i can't use assign neither fromelements method.

    any function like SqueezeBox.open(url) passig directly the url and not getting it from el??

    like moodalbox does...

    thaks for any help..
  • ziozec · 8 months ago
    i did it by myself...i added this function to the library...

    open: function(url, options) {
    this.initialize();
    this.setOptions($merge(this.presets, options || {}));
    this.assignOptions();
    this.url = url;
    var handler = this.options.handler;
    if (handler) return this.setContent(handler, this.parsers[handler].call(this, true));
    var ret = false;
    this.parsers.some(function(parser, key) {
    var content = parser.call(this);
    if (content) {
    ret = this.setContent(key, content);
    return true;
    }
    return false;
    }, this);
    return ret;
    },

    now i can open the squeezemodal directly from every onclick event (td, div, span ...) like this

    SqueezeBox.open( url, {
    size: {x: 600, y: 500},
    ajaxOptions: {
    method: 'get' // we use GET for requesting plain HTML
    }
    });
  • Tom · 8 months ago
    Hallo Harald,

    ich habe inzwischen das halbe Internet abgegrast und komme nicht mehr weiter:
    Ich möchte gerne in einer per Ajax geladenen Seite innerhalb einer SB Mootools ausführen. Das funktioniert jedoch nicht.
    Beispiel: Ich öffne eine SB; dort soll ein Request ausgeführt werden oder zu bestimmten Elementen ein addEvent hinzugefügt werden. Normales Javascript funktioniert problemlos. Mootools jedoch nicht.

    Wie kriege ich es gebacken, dass innerhalb der HTML-Seite, die in der SB angezeigt wird, auch Mootools ausgeführt wird?

    Vorab schon mal Danke für Deine Hilfe!

    Tom
  • Damien · 8 months ago
    By deciding to write your post in english. You excluded all non-german speakers from being able to help you. Using english might be better for you.
  • digitarald · 8 months ago
    Support and discussions moved to http://digitarald.de/forums/. If you already commented it here, please repost your question or bug report in the forum to get support.
  • burun estetigi · 8 months ago
    Link to the example page, would make testing and fixing easier.
  • burun estetigi · 8 months ago
    is there a way, that the script automatically detects the size of the loaded document, when loading via AJAX. I have the problem that I'm loading dynamically created content, and thus I don't know the exact size of the content. I also want to prevent scrollbars on the sides of the sqeezebox.
  • digitarald · 8 months ago
    Planned. Please post other suggestions and bugs to the forum @ http://digitarald.de/forums/
  • Hervé · 8 months ago
    Hi,
    Thx a lot for your great job !

    I've a problem : with IE, when I open an iframe with the squeezebox, the font isn't the right one. It's always an ugly font. It works with IE, chrome and Safari but not with IE.

    Does somebody have an idea ?

    Thx again...
  • fulgorek · 8 months ago
    great work!!!
  • Dekorasyon · 7 months ago
    Type your com
    As a follow up, on the 'from elements' section, how do I hide the div on the page and only show it in the squeezebox? I tried adding style (display:none), but it also hid the element in the squeezebox. Any help would be appreciatedment here.
  • digitarald · 7 months ago
    Please, make my life easier and use the forums. Thanks :)
  • Naomi · 7 months ago
    It's works perfectly. Thank you for this fabulous script. I hope the grouped images function will be out a day.
  • Tyrone · 7 months ago
    progress.addEvent('click', function() {
    this.currentProgress.start($random(0, 100));
    }.bind(this));


    Funny guy, eh??
  • digitarald · 7 months ago
    Good catch, I forgot those debug lines. Stable 3.0 release fixes that ;)
  • mb2000inc · 7 months ago
    Safari is having issues with it... in an effort to get it to play a streaming video hosted on a friend's server, I had to embed a video onto a completely separate page... and call it through the squeezebox.... it works great in IE 7 & FireFox... but Safari is giving me the following error.

    This page contains the following errors:
    error on line 5 at column 24: Opening and ending tag mismatch: root line 0 and div
    Below is a rendering of the page up to the first error.

    Any thoughts?
  • jan · 6 months ago
    Can I get a content from specific element via this AJAX method? for instance I have a requet from one page (within the same domain) but do not want to retrieve whole page just one div element

    Is this possible?
  • Mon · 6 months ago
    Hey, I don't know how relevant this is, as Firefox 3.5 is still not at release stage, but the box won't load in it. It stays at the loading animation. The content loads OK though..
    I am not sure if this is the cause, but firebug reports: "Use of getBoxObjectFor() is deprecated. Try to use element.getBoundingClientRect() if possible."
  • Mon · 5 months ago
    disregard the above, it works now, probably since 3.5 reached official release.
  • Kay · 6 months ago
    Is there a way to make the page behind the squeezebox refresh once you close your squeezebox.

    Thanks
  • Mon · 6 months ago
    @kay: yes, do something like the following:
    $$('a[rel=boxed]').each(function(item){
    item.addEvent('click', function(){
    return !SqueezeBox.fromElement(item,
    {
    handler:'iframe',
    onClose:function(){
    window.location.reload();
    }
    });
    });
    });
  • Max · 6 months ago
    Hello,
    I use SqueezeBox 1.0rc1 (buildin joomla 1.5.x)
    I cant do ajax request, my code:
    window.addEvent('domready', function() {
    SqueezeBox.initialize({});
    $$('a.modal').each(function(el) {
    el.addEvent('click', function(e) {
    new Event(e).stop();
    SqueezeBox.fromElement(el);
    });
    });
    });

    html:
    click me

    where is error? thanks.
  • Kevin · 6 months ago
    i think there is a bug in the ajax portion of your script. with Request.HTML the arguments for onSuccess are as follows: responseTree, responseElements, responseHTML, responseJavaScript. you are only accepting the first argument 'resp'. this works for some responses. but if you wrap your ajaxed html in a div...the styles seamed to be stripped from its inner elements.

    my tests responses were:

    <div>

    text IS NOT red

    </div>

    and

    text IS red



    would we maybe want to accept all the arguments for onSuccess and pass the responseHTML to applyContent? that initially seams to fix this problem for me, haven't looked too in depth though.
  • Rob V · 5 months ago
    Ok - this may be a really dumb question - but how do I get it to display w/out the close button (X in the upper right) besides just removing the image?
    Im kicking it off w/ this :
    SqueezeBox.open('display_alert', {
    size: {x: 300, y: 200},
    closeBtn: false,
    closable: false
    });
    But it still shows the X.
    Granted w/ the closable set to false - it does nothing, but is there an option to not display it?
  • zaxuz · 4 months ago
    you can hide the close button by changing its style in squeezbox.css. Like this:
    #sbox-btn-close {
    position: absolute;
    width: 30px;
    height: 30px;
    right: -15px;
    top: -15px;
    background: url(/images/squeezebox/closebox.png) no-repeat center;
    border: none;
    display: none; /* hide */
    }
  • Name · 5 months ago
    please, help to fix this
    This page contains the following errors:

    error on line 8 at column 9: Opening and ending tag mismatch: img line 0 and div
    Below is a rendering of the page up to the first error.

    i get this error in google chrome. i've seen in comments, that you've fixed it for safari, can you tell me how to fix it? sorry for weak english =)
  • Gorky · 5 months ago
    please, help to fix this
    This page contains the following errors:

    error on line 8 at column 9: Opening and ending tag mismatch: img line 0 and div
    Below is a rendering of the page up to the first error.

    i get this error in google chrome. i've seen in comments, that you've fixed it for safari, can you tell me how to fix it? sorry for weak english =)
  • Max · 5 months ago
    Hi everybody!

    I need to close an AJAX window after a click on some link.

    What function should I call?
  • qwerty · 5 months ago
    I need to close an AJAX window when user clicks on some link.

    What function should I call?
  • Mike · 5 months ago
    Try this:
    <a href="javascript:parent.SqueezeBox.close()">(Close box)</td>
  • qwerty · 5 months ago
    Oh! Thanks a lot!
  • dlarah · 4 months ago
    I have a link working that opens an iframe in a squeezebox. I would like to be able to link to this page and have that same squeezebox open onload. Any ideas? Support forums have similar questions with no response. The forums look like an echo chamber to people seeking help. Thanks.
  • Stu · 1 year ago
    Getting the same error as Jordi in IE6 where the link brings up the code instead of the expected ajax request. It's not my implementation, as I get the same when I check your demos.

    Works beutifully in firefox and safari though!