Code Bank

Hi, i tried to get mooCollapsibles to work with Hash.Cookie (due to some browsers limits), but it seems my knowledge are not proper enough. Can you help me?~I have noticed that your version of Multibox, unlike its Phatfusion counterpart, does not resize if the corresponding link's rel attribute is changed during runtime. What's the best way to trigger or resize this version of Multibox in JavaScript during runtime ? ~I wanted to do the same thing as @Ben. I believe I've sorted it out, by using: top.myMediabox.close(); Thank you so much for putting this script together Liam! It's exactly what I needed!~The multibox 1.2.3 does not seem to handle AREA tags. A fix is available at adriaankoster.nl/files/multiBox.js cheers, Adriaan.~Hi First of all : thanks for your job with the phatfusion multibox, it's great.I loved the original but there was some anoying bugs you fixed. I have a question, is there a way to remove the links in the bottom of the box when you use several rel="type:element" ( htm box). I always have the arrows as i don't need this navigation bar. thanks thanks~Liam, I still haven't solved this issue. nothing I tried works. I guess this issue will remain unsolved. I tried posting the code I use, so you can see what I'm doing. but I get a spam message. If you have any other Ideas on how to solve this issue, please let me know.~Hey Liam, still loving your scripts. I am running into the same issue as Nico (below). Is there any way of using multibox inside an iframe? Thanks, hope all is well.~Do you still have the multiBox version that worked with: mootools-1.2.1-core-yc.js and: mootools-1.2-more.js ? i cant get the current one work with the other parts in my site (menu & slideshow, wich work with the moo version named above ...) THX 4 your help in advance!~Hi, How can I close the multibox from a html page displayed in an iFrame.~@Ben Ben, off the top of my head (I have never tried it) you need to be calling the same function the 'esc' key calls which is: this.close(); However, 'this' refers to the multiBox class which your function won't be part of, so i think you will need to use: multiBox.close(); Have you already tried this?~I think there may be a problem with your (fantastic) new multibox, and the latest build of mootools (core: 1.2.2 more: 1.2.2.2). The effects all work, but the multibox will only fire once! Once you close the first box, it refuses to fire it - or any other - a second time. The problem vanishes when I swap out the latest mootools build for the ones included in your download. Excellent work though, and hopefully this isn't a big problem to solve.~I've been using the Multibox for Mootools 1.2 for several purposes now. I am stuck at one item : I am using the multibox to present a form in a HTML Element (#link) and I want to be able to close the box automatically when the form has been sent through AJAX or using a link when the ajax request has been received. could you tell me how to do this? Also I want to ask for the code to add a onclick event for a element that is inside the box to close the box. I hope you can help me. Thanks and keep up the great work.~Hi Liam I need to use multibox on a group of thumbnails. The thumbs are displayed inside an iframe. The problem I'm having is that the overlay box expands only within that iframe and not over the parent window. How can I get around this? Do I have to change the 'container' parameter? Cheers -Nico~Liam, Can you tell me how to launch Multibox from an iframe and have it load in the parent window? Any help is greatly appreciated. Thanks!~alright bro total legand like bring on titp 2009~Thought I would just ask the question :) I wanted to ask if you could help me. I have a wrapping div on a page - inside that div is another div holding an image on the middle of the page. I have an Area map on the image to create some 'hot spots'. I am trying to use multivBox to display an image (and then a web page) based on what hot spot the user clicks. But when I go to assign the class, id, rel etc I get a javascript error of "el.rel is undefined" (line 88 in multiBox.js). I've tried adding the code on the image and area map - but no joy - could you help? Thanks in advance. mark~Hi, Trying to send you an email question regarding multiBox - but it's saying I've not filled in all the required fields..when I have. Would I be able to send you a question?~HI, is there a way to start a Multibox-Gallery from an element wich is NOT in the gallery? Thx~Hello, thanks for your website. Anyone has script probleme on IE6?~The new multiBox is finally available for download. Here's the link: [url=http://www.liamsmart.co.uk/Downloads/multiBox/]multiBox with groups[/url]. The first 2 images are grouped, the 3rd is a single element, the next 3 video files are grouped, and the rest are single elements. Details of some of the things been done are explained on the demo page. Having the option to add elements into groups was a feature I had to add not just for myself, but also for the numerous people who have contacted me asking how it can be done, as well as the people who have posted the same question on the Phatfusion blog and forum. MooTools 1.2 has a built in utility called Swiff that creates a Flash object. To reduce code, and take advantage of the new MooTools features. For accessibility & usability purposes, I have also added keyboard shortcuts. "spacebar" and "right" = next, "left" = previous and finally "esc" = close. Someone pointed out to me that the overlay doesn't fade away the same way as it fades in. I have sorted that issue with a simple chain. Another thing that bugged me that you either used descriptions, or didn't. You couldn't just allow certain elements to have descriptions, and some not to. The only way you could do this was to call the MultiBox script more than once. It just doesn't make sense to have to make a separate instance of the class just because you want some multiBox elements to have descriptions, and some to NOT have. But I'm glad to say I have sorted that. Just add "noDesc" into the "rel" tag and you will override the options setting. I have thoroughly tested the script in the usual browser: IE 6, 7 & 8, FF2 & 3, Safari (Windows & Mac) and Opera. Please let me know through this blog, or by the email address at the top of the script, or through my contact form, if you find any bugs that I have missed or any extra features you think I have forgotten, or think would be useful. Enjoy!~Hey, i thought the problem was fixed but it was there again! Im going crazy, Liam~Thanks Liam, its true. i wanted to work with several images categories (with their own numbering) and I thought that it was the right way. So i dont still know if this is possible. Thanks again (and again sorry for my english).~@Pakorro You are using the script wrong. You are calling multiBox in twice. Why? If you remove that then the div#overlay will resize it height as I have done it to your page using Firebug. I have left the same msg on the Phatfusion website. Good luck. Liam~Liam. Im reading the phatfusion topic and your blog about overlay bug in multibox but i have a problem. The overlay bug in multibox isn't fixed with your files in my page: topinteractiva . Com / portafolio.html (with firefox 3). I think Im using them ok but the bug is there again! Whats happened? Sorry for my bad english...~@Duy T. Doan Can you give me a link of the site your having trouble with as it is most likely to be your CSS that is at fault. Do know that z-index is ignored by IE because it uses its own stacking order?~Keep on blogging! :)~URGENT !!!!!! Help please Image showed with multibox hide behind active content (like flash, wmv player).~Someone pointed out to me that I included the wrong path to the mp3 and movie players within the multiBox options included on the HTML page I use to show as an example of [url=http://www.liamsmart.co.uk/Downloads/multiBox/]multiBox[/url] working. I have changed it to the correct path and re-zipped it for you all to [url=http://www.liamsmart.co.uk/Downloads/multiBox/]download[/url].~I received an email with regards to a bug in the overlay script that is part of multiBox. There was error in Internet Explorer due to document.body not being in a selector. I'm not sure why a selector is needed for such a basic JavaScript select... But IE seems to need it. I have fixed this bug, and whilst fixing it, I spotted another IE6 minor bug where the width of the overlay is calculated. Due to the script using document.body.getSize().x, if you have a width on the body (like I do on my example page), then the overlay width isn't going to be as wide as your browser window. So I changed the code to use window.getSize().x to make sure the overlay is always full width. If anyone spots any more bugs with any of my scripts, then please drop me and email or leave a comment on this blog and I will look at it ASAP.~I have created a page listing links to all the [url=http://www.liamsmart.co.uk/Downloads/]downloadable scripts[/url] I have written. Please feel free to browse my [url=http://www.liamsmart.co.uk/Downloads/]downloads[/url] page and help yourself to any scripts you might find useful. Please feel free to leave comments or suggestions via my blog. Liam~mooCollapsibles updated to version 1.1. Most of the fixes are when the 'Accordion' option is set to true. Setting were not being saved but I have fixed that. One major flaw was having a loops inside loops, but I have removed these and cleaned up the code. Another fix I made was to inject a clearing class into the bottom of each collapsible body. This way, if there is floating content in the collapsible, there wont be any nasty overlaps. I haven't zipped it up yet and made it available for download until I have tested it further. Click on the following link to see [url=http://www.liamsmart.co.uk/Downloads/mooCollapsibles/]mooCollapsibles[/url] in action. Liam~mooCrumbs anyone? I have been playing about with a script that will only show my websites 'breadcrumbs' on user request. This is useful for deeper websites than mines but thought I would try and see what I could conjure up. Here's what I have so far: [url=http://www.liamsmart.co.uk/Downloads/mooCrumbs/]mooCrumbs[/url]~Hi Connan, What email thing are you referring to? Is it the collapsible content? I built that myself. Check out the blog entry for 15/10/2008. I have it available to download. Regards, Liam~Hey mate, where did you go to get this email form thing, please reply.~Now that my website is almost complete, I have kept a list of all the websites that I have found useful. Some of these contain code, tips, information and pretty much anything that I found helpful. I have decided to add these links to my website incase they might help someone else who is looking for the same information. View my [url=http://www.liamsmart.co.uk/Portfolio/Code_Bank/]code bank[/url].~Ok, I know Samuel is working on v1.4 but I have updated Phatfusion's multiBox to work with MooTools v1.2.1. View [url=http://www.liamsmart.co.uk/Downloads/multiBox/] multiBox for MooTools 1.2[/url] . It was more time consuming than I thought it would be. The Ajax request and html element were real puzzlers. I have managed to get the Ajax request working fine (you can view the code to see what's in place), but I feel the following code should go in its place as this is how the MooTools docs says how to use Ajax requests. I don’t get any errors with the following code, but the Ajax isn't put into the container… Proposed Ajax request code: new Request({ url: this.contentObj.url, method: 'get', update: 'MultiBoxContentContainer', evalScripts: true, autoCancel: true }); I am sure it is 99% correct but if anyone knows what I'm doing wrong, then please let me know, either on this forum, my email address which is in the scripts, or via my website. I have added some extra options as well. These are optional and set within the options as they might not be everyone's taste. One thing I would like to add is the ability to put files into groups so the user will only be able to navigate through items belonging to same group. I fixed a few IE6 bugs in the CSS, changed the sizing script in the overlay so it works better in IE6 (not sure why it didn’t work with MooTools 1.2.1 so I just did it a slightly different way and it seems to work fine). This updated version of multiBox is tested in IE6 & 7 and Firefox 3. I made sure all original file types work fine, and they are all included on the default page within the zipped folder. It would be good if other people could test it in different browsers. Enjoy!~Have you ever wondered how to force the download dialog box to appear when linking to Word or PDF files instead of them opening in normal web browser? Well this small file will make sure it does. All you need to do is link to that file, and specify which file you want to download using a query string at the end. The path in the query string is the relative path from the root of your site as the ASP will do the rest. You can view [url=http://www.liamsmart.co.uk/Downloads/forceDownload/]ASP forceDownload[/url] to see the script in action. Thanks for the help from [url=http://forums.aspfree.com/]ASP Free forum[/url]!~As promised, here is the first version of [url=http://www.liamsmart.co.uk/Downloads/mooCollapsibles/]mooCollapsibles[/url]. Everything you need is contained within the zipped folder. This class is perfect for FAQ sections on a website, or for blogs like my site. The best feature is the fact that it stores which collapsible boxes the user closes and opens in the form of a cookie, so that when he/she returns to that page, the same boxes are open or closed.~[url=http://www.liamsmart.co.uk/Downloads/mooTicker/]mooTicker[/url] v1.0 for MooTools 1.2 is now available. This is at version 1. Testing and feedback would be great! It is a modification of David Walsh's typewriter class but now supports multiple strings, and has a few more features such as random generated typos and timer control. Full credit goes to David Walsh for writing this great script! Soon, I will be posting a version of Phatfusion's Multibox that is fully MooTools 1.2 compatible, as well as pack new features such as roll-over effect, overlay icon and chain animation. Along with this, I have written a class called mooCollapsibles which I use on this blog. This has a few nifty features, such as mimicking the infamous MooTools Accordion but with toggle, the toggle buttons rotate too point in the correct direction, and you have full control of the speed and transition type from within the options. Soon enough, I will also write a small class called mooCrumbs as I want to do something with my websites breadcrumbs. All the files needed to get you started are included in the zipped folder. Enjoy!~Website news ticker built that supports multiple messages! I will be making it available for download soon so keep checking back.~New website launched for 2008!!!

I always keep a note of the websites where I find answers to scripting problems, useful code and pretty much anything that I know can help me in the future. Over time, this has built up into quite a big list. Here is part of that list.

Vector Graphics

Flash & Actionscript

HTML & CSS

JavaScript & MooTools

classic ASP

Fonts

Accessibility

In case anyone else might find this useful, I have made these links available on my website. I´m sure a lot of people will find them as useful as I do.

Over time I will be adding more and I will use appropriate anchor tags to categorise them so it is easier to know what information they are pointing to.