View Full Version : Add print and save button in available lightbox

11-04-2014, 02:41 AM
I would to add print and save button in my images. So, user of the system can print and save the images. I have try copy code from sandbox.tse but nothing happen to my images.
Anyone please help me what actually the problem?

11-04-2014, 04:33 AM
Are you using Lightbox JS v2.51? Because as far as I can tell, the print button (of sandbox.tse) is only for that (or earlier - not recommended) version (current version is v2.7.1 - no print feature for it though as far as I know). As for a save option, one should be able to right click and 'save as' in the normal manner as long as one is not also using the group (next previous buttons) option of lightbox.

The entire archive of LB 2.51 setup to print is available here:


So, you could just use it.

If you want more help. please post a link to the problematic page on your site so we can see it.

11-05-2014, 02:55 AM
Hi John, thanks for reply
I have download and use print.zip. Its work well. But when I copy lightbox.css and lightbox.js in my page nothing happen. It is because of the lightbox version? My situation: user have requested to print and save the company namecard template. Now, we already have name card template which is display in lightbox and I have to add print and save button to allow customer get the namecard easily. This is code for my page. The problems is here or in another files?

Thanks for your help again.

11-05-2014, 02:59 AM
"But when I copy lightbox.css and lightbox.js in my page nothing happen. " You cannot copy these in any page. Please explain what you are doing.

In order to use the print version, you must use the javascript, styles, and other helper files that come with that version.

11-05-2014, 06:27 AM
Actually im trying to copy style and javascript from sandbox.tse and replace it with
my current style and javascript. So, the thing does not work because of the different version right?
So, what should i do to add print button in my site? and how to solve the lightbox version?
Thanks again for your help and explanation John.I really appreaciate it :)

11-05-2014, 08:45 AM
Use the print version. Then if you want to edit (customize) the styles to make them look closer to another version or to look like anything you want, you can edit them. But you cannot just drop in a different version of the styles or of the script. Well, you can in some cases, but if that makes it stop working you cannot. From what you're telling me that's what happens, so - obviously you cannot do that.

11-06-2014, 06:16 AM
So, I must use the print version to make sure print function working instead of using my style right? Thanks John. I will try again:)

11-06-2014, 07:34 AM
Hi John, I have another stupid question, how to know we use the print version?Because I have try to edit index.html include in sandbox.tse as I want (by include my own images) but I got database error.

Thank You

11-07-2014, 12:15 AM
If you are having server side problems, that has little or nothing to do with the script. Server side issue can include but are not necessarily be limited to incorrect paths and/or syntax. Often the best practice is to create a working example without any server side code. Make sure everything is working. Then start to build from the specific to the template, checking each step along the way that no errors creep in.

After all, in cases like these, server side code only writes client side code. Just make sure it's doing it right. As a troubleshooting tool you can use the 'view source' of the browser. If it doesn't look like the non-server side generated code generated example, then something is off on the server side.

11-07-2014, 07:22 AM
I'm not sure either the problem comes from server side or lightbox version. Actually I am confusing whether the ways I'm installing lightbox version correct or not. Can you give some guideline and how can I know the server site have problem John?

11-07-2014, 05:13 PM
Set it up first with no server side code. If there's still a problem it has something to do with the script or how you're using it. If that happens and you want help, post a link to the page so we can have a look at it.