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 6891491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:25:01+00:00 2026-05-27T06:25:01+00:00

I installed fancybox in my script but for some reason instead of clicking into

  • 0

I installed fancybox in my script but for some reason instead of clicking into a popup it just clicks to the location of the image. I am running it through a bit of php code that is generated numerically (based on the information in the database). Thus, there is more than one block of code but its essentially the same code. I just do not know how to get it working any suggestions would be great. My code is below.

<?php 
if(isset($_GET['package'])) {
    $package = ($_GET['package']);
    $arr = array();
    $items = "SELECT * FROM ind_products";
    $item_list = mysql_query($items);
    /*$row = mysql_fetch_array($item_list);*/
    while($row = mysql_fetch_array($item_list)) {
        $arr = explode(',',$row['packages']);
        if (in_array("$package",$arr)) {

        echo "<form action=\"\" method=\"post\" class=\"jcart\" >";
        echo "<div id=\"itemBox\" align=\"left\">";
        $item_name = ($row['item_name']);
        $size = ($row['size']);
        $description = ($row['description']);
        $id = ($row['id']);
        $photo = ($row['photo']);
        $photo2 = ($row['photo2']);

        if ($photo == '') {
            $photo = 'images/pph.jpg';
        }
        if ($photo2 == '') {
            $photo2 = 'images/pph2.jpg';
        }
        if ($description == '') {
            $description = 'Description goes here!';
        }
        echo "<input type=\"hidden\" name=\"my-item-id\" value=\"$id\">";       
        echo "<input type=\"hidden\" name=\"my-item-name\" value=\"$item_name\">";  
        echo "<input type=\"hidden\" name=\"my-item-price\" value=\"0.00\">";   
        echo "<input type=\"hidden\" name=\"my-item-url\" value=\"\">"; 

        echo "<p id=\"info_image\">";
        echo "<a id=\"single_1\" href=\"$photo2\">";
        echo "<img src=\"crop.php?h=85&w=85&f=$photo\" align=\"left\" alt=\"item images\" />";
        echo "</a>";
        echo "</p>";

        echo "<p id=\"info_box\">";
        echo "<span id=\"pro_name\">",$item_name,"</span>",'<br>';
        echo "<span id=\"pro_size\">",$size,"</span>",'<br>';
        echo "<span id=\"pro_des\">",$description,'<br>';   
        echo "<span id=\"pro_title\">Quantity</span><input name=\"my-item-qty\" type=\"text\" value=\"1\" size=\"3\" />";
        echo "<span id=\"pro_input\"></span><input type=\"submit\" name=\"my-add-button\" value=\"add to inquiry\" class=\"button\" />";    
        echo "</p>";
        echo "<div style=\"clear:both; margin-bottom:0.5em\"></div>";
        echo "</div>";
        echo "</form>";
        }else{

        // do nothing for now


        /*echo "<form action=\"\" method=\"post\" class=\"jcart\" >";
        echo "<div id=\"itemBox\" align=\"left\">";
        $item_name = ($row['item_name']);
        $size = ($row['size']);
        $description = ($row['description']);
        $id = ($row['id']);


        echo "<span id=\"pro_name\">",$item_name,"</span>",'<br>';
        echo "<span id=\"pro_size\">",$size,"</span>",'<br>';
        echo "<span id=\"pro_des\">",$description,'<br>';
        echo 'There are no products to display!!';
        echo "<div style=\"clear:both; margin-bottom:0.5em\"></div>";
        echo "</div>";
        echo "</form>"; */
        }
    }
}else{
    echo 'The packages are not set';
}
?>

The fancybox code:

$(document).ready(function() {

       $("#single_1").fancybox({
          helpers: {
              title : {
                  type : 'float'
              }
          }
      });
});
  • 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-27T06:25:01+00:00Added an answer on May 27, 2026 at 6:25 am

    are you sure that all required scripts (jquery + fancybox), and also all additional loaded js-script/code where loaded/initialized without errors?
    any occuring javascript-error before the fancybox-setup-call would prevent the successfull initiation of that.

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

Sidebar

Related Questions

I have fancybox installed on my website and I am getting some strange behaviour.
I installed MinGW and I just want to link my program into a single
I installed in the past numexpr successfully on many machine. But now I just
I installed Redcar editor in my Ubuntu 10.10, but I have some problems with
Installed both SonataMediaBundle, SonataNewsBundle and SonataAdminBundle (and much more but these matter). When posting
Installed rubyinstaller-1.8.7-p358.exe, then tried to install jammit , but the config.gem command isn't being
I installed the packages Android 2.1, Android 2.2 Android 4.0.3, but other than 2.1,
I installed new wordpress . and made some changes in twentyten theme.. only color
Installed the IronPython tools for VS 2010 but it didn't associate the *.py files
Installed Magento 1.6.2.0, and noticed that the links are like http://MYSEUPERSTORE.com/ index.php /customer/account/ but

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.