-
Website
http://digitarald.de -
Original page
http://digitarald.de/project/squeezebox/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
RaYz
7 comments · 3 points
-
sim
37 comments · 1 points
-
perrohunter
11 comments · 1 points
-
michalc
8 comments · 1 points
-
digitarald
254 comments · 3 points
-
-
Popular Threads
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?
Now i use SqueezeBox.fromElement(url)
What is the second argument to lauch an iframe and other settings ?
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 �
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.
{"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.
You can hopefully see my (modified) dilemma at http://borkurs.com/tests/images.html
I'm also getting a vertical scollbar when I open the SqueezeBox.
<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')");
}
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);
}
i think fromElement isn't accepted by Firefox, is there an other tips ? But if you add an extra method it's perfect :P
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?
The php script is very simple:
<?php
print "<pre>".print_r($_POST, true)."</pre>";
?>
great new website anyway :)
have swing
Can u help me?
http://www.lariko.net/test/test.html
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 :)
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 :-)
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.
And an iframe would animate to loaded state when it has a loaded body element?
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.)
Please how can we lauch lightbox with javascript function ?
"$empty is not defined"
using Firefox 1.5+ and mootool 1.2b dev build 1553
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
Thanks
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
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.
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.
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
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.
'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
Thanks a lot.
Thanks in advance.
$('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.
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.
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
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!
Thanks!
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???
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!
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
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
I'm try to use squeezabox as form's target. How can I do that?
$('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
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() {
-----------------------------------------------------------------------------------------------------------
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!
` 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?
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.
`SqueezeBox.fromElement('linkset_search.php', {handler : 'iframe'});`
For example, it is possible to add an action to a button element that closes the box?
Many thanks,
--Keith
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) || '';
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?
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
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.
Patches for the js and css are here:
http://damoxc.net/patches/
Thanx a lot, great work!
- edit SqueezBox.js line 371
- substitute <width: this.options.size.x,>
- with <width: this.options.size.x -20,>
A better solution is appreciated :)
Cya!
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.
No errors in Firebug... I think using the Assets plugin could make this more stable.
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
Also, using percentages for the size option sometimes causes problems.
Thanks for the impressive work!
Of course it would be nicer to solve this by extending the SqueezeBox class rather than modifying it!
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.
SqueezeBox.assign($$('a[rel=boxed]'));
Works great :)
thanks.
The script does work on Firefox but i get the error on both browsers (it does not work on IE). Any thoughts?
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!).
Anyone any ideas/help?
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. :/
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.
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.
Of course it would be nicer to solve this by extending the SqueezeBox class rather than modifying it!
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.
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
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() {
//alert('test');
return false;
}
});
});
and:
a href="actions/" class="boxed" rel="{handler:'iframe',size:{x:1050,y:340}}">
But what I really want to do is change the size of the window from within the window, so I want to click an ahref inside of add.php, and it will load another page or Ajax call, but it will resize the squeezebox..
Is it possible??
Appreciate the help
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.
onShow doesn’t get fired a lot of the time (90%) for the ajax box.
Did you fix it?
`this.overlay.style.zIndex = this.win.style.zIndex = this.options.zIndex;`
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?
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.
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
I can't get "onSubmit" to fire in IE6. It works fine in FF. Does anyone else have this problem? Any sugestions?
Thanks,
Niklas
/Niklas
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.
[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.
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.
Is there any way to resize the squeezebox from one iframe page to another for different sized content?
ie:
SqueezeBox.assign($$('a.boxed'), {
parse: 'rel',
size: {x: 950, y: 669},
onClose: { url: baseURL+'training.php' }
});
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.
did you found a solution to that problem? I am having the same issue :-|
I just need to have the box showing (overlaying the page) by js. Any hint?
inside my popup box
doesn't work in IE, but does in FF???????????
http://digitarald.de/project/squeezebox/1-1/ass...
- 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
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
and... i'm so sorry for my engish :(
thanks
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.
Thanks a ton in advance.
Thanks a ton in advance.
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 ?
Using sorttables breaks SqueezBox (when closing).
http://www.kryogenix.org/code/browser/sorttable/
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
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
SqueezeBox.fromElement($('div-id'), {size: {x: 500, y: 300}})
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
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);
goodluck
tag with the ID somewhere maybe hidden
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 ={
(a href="mysite.html" rel="boxed" id="mysiteSquee" style="display:none;")My link(/a)
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
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.
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.
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?
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.
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?
I feel like I've been trying but have epic failure.
=(
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
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.
This is my website.Thanks a lot!
Glad I donated $100 worth of books and shipped them over seas, and that was about 6 months ago.
Thanks!
add this line to the top of the trash: function()
this.content.empty();
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.
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
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 : /
`window.addEvent('domready', function() {`
instead of
`window.addEvent('domready', {`
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;
I forget it, the function addEvent must be redefined like that
window.addEvent('domready', function() {
SqueezeBox.assign($$('a.boxed'), {parse: 'rel'});
});
I so sorry.
save this image to js folder
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
"Entity 'eacute' not defined"
Can you help me please ? Thanks by advance.
PS : no problem with IE or Firefox.
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
JS:
window.addEvent('domready', function(){
SqueezeBox.assign($('launcher'), {options});
$('launcher').fireEvent('click');
});
HTML:
<div id="launcher"></div>
CSS:
#launcher{display:none;}
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
Can someone explain me how to open it when the page load, please. It would be much apreciated
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?
Really need help! Love this script and wan to use it.
Erik
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.
<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!
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?
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.
I tested your iFrame example above and the same problem occurs.
Any possible fix for this?
Erik
just like submit form using mootools without loading new page...
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
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
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.
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.
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
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
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.
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
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
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!!!
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
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.
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.
where can i find the docs for the latest version of squeezebox?
thank u
I'm running into a problem where Squeezebox seems to be removing HTML code and CSS styles from content displayed via URL (basic SB usage). I have the same code on multiple sites, but on one it fails while the others work fine.
Problem is: tags become disabled (can't click links), and any formatting appears to be ignored or removed... all styles are gone, including
tags.
Any ideas?
btw, I almost have a solid pluggable solution for a gallery based on SB, the prototype is running at my site link in the "Case Studies" area... contact me if you want a further explanation or the finished module once I wrap it up properly.
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;
}
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', '');
}
},
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', '');
}
},
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....
Has anyone done this, or know of a link that talks about doing this effect?
Thanks!
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..
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
}
});
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
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...
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.
this.currentProgress.start($random(0, 100));
}.bind(this));
Funny guy, eh??
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?
Is this possible?
I am not sure if this is the cause, but firebug reports: "Use of getBoxObjectFor() is deprecated. Try to use element.getBoundingClientRect() if possible."
Thanks
$$('a[rel=boxed]').each(function(item){
item.addEvent('click', function(){
return !SqueezeBox.fromElement(item,
{
handler:'iframe',
onClose:function(){
window.location.reload();
}
});
});
});
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.
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.
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?
#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 */
}
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 =)
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 =)
I need to close an AJAX window after a click on some link.
What function should I call?
What function should I call?
<a href="javascript:parent.SqueezeBox.close()">(Close box)</td>
Works beutifully in firefox and safari though!