Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 923417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:11:24+00:00 2026-05-15T19:11:24+00:00

I’m experiencing a little bugger using the fancybox jquery plugin. I want to use

  • 0

I’m experiencing a little bugger using the fancybox jquery plugin. I want to use a variable that holds the image filenames to populate the file list inside the fancybox function. But I can’t seem to get it to work.

In this example I’ve put the filenames in manually but that’s the part I’d like to populate with var “files” which, when printed, looks exactly the same as the current file list in the fancybox function but when I replace the file list with that var it doesn’t work. The only issue I can detect is that the quotes surrounding the filenames are converted to %27

$("#schermafbeeldingen").click(function() {
        $.post(window.jsRootPath+"includes/getSomeStuff.php", {},
        function(data){
            //files = data.sFancyBoxParams;
            var myArray = data.sFancyBoxParams.split(',');
            files = '';
            for (i=0;i<myArray.length;i++)
            {
                files += '\'' + myArray[i] + '\'' + ',\n';
            }
            alert(files);
            files2 = "'http://cms.admixconnect.nl/upload/www.zerniq.nl/schermafbeeldingen/1-start.jpg','http://cms.admixconnect.nl/upload/www.zerniq.nl/schermafbeeldingen/2-content.jpg','http://cms.admixconnect.nl/upload/www.zerniq.nl/schermafbeeldingen/3-_filemanager.jpg','http://cms.admixconnect.nl/upload/www.zerniq.nl/schermafbeeldingen/4_-_imagemanager.jpg','http://cms.admixconnect.nl/upload/www.zerniq.nl/schermafbeeldingen/5-_seo.jpg','http://cms.admixconnect.nl/upload/www.zerniq.nl/schermafbeeldingen/6-banners.jpg','http://cms.admixconnect.nl/upload/www.zerniq.nl/schermafbeeldingen/7-downloads.jpg'";
            files3 = '"http://cms.admixconnect.nl/upload/www.zerniq.nl/schermafbeeldingen/1-start.jpg","http://cms.admixconnect.nl/upload/www.zerniq.nl/schermafbeeldingen/2-content.jpg","http://cms.admixconnect.nl/upload/www.zerniq.nl/schermafbeeldingen/3-_filemanager.jpg","http://cms.admixconnect.nl/upload/www.zerniq.nl/schermafbeeldingen/4_-_imagemanager.jpg","http://cms.admixconnect.nl/upload/www.zerniq.nl/schermafbeeldingen/5-_seo.jpg","http://cms.admixconnect.nl/upload/www.zerniq.nl/schermafbeeldingen/6-banners.jpg","http://cms.admixconnect.nl/upload/www.zerniq.nl/schermafbeeldingen/7-downloads.jpg"';
            $.fancybox([
                'http://www.test.com/schermafbeeldingen/1-start.jpg',
                'http://www.test.com/schermafbeeldingen/2-content.jpg',
                'http://www.test.com/schermafbeeldingen/3-_filemanager.jpg',
                'http://www.test.com/schermafbeeldingen/4_-_imagemanager.jpg',
                'http://www.test.com/schermafbeeldingen/5-_seo.jpg',
                'http://www.test.com/schermafbeeldingen/6-banners.jpg',
                'http://www.test.com/schermafbeeldingen/7-downloads.jpg'
            ], {
                'padding'           : 0,
                'transitionIn'      : 'none',
                'transitionOut'     : 'none',
                'type'              : 'image',
                'changeFade'        : 0,
                'overlayOpacity'    : 0.8
            });
        }, "json");
    });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T19:11:24+00:00Added an answer on May 15, 2026 at 7:11 pm

    Using alerts, files may look like the array passed to the fancybox function, but it’s not. files, as you are defining it, is a string, while the array you’re passing in is an.. array 🙂 I don’t know fancybox in detail, but i guess it can take an array of image urls and make a slideshow of it. When you pass a string into it instead, it will most likely try to parse it as HTML and find out that it’s invalid HTML.

    I would guess you are all set after doing var myArray = data.sFancyBoxParams.split(',');
    and that you can pass myArray as the parameter to fancybox.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.