URGENT: Help with Floatbox used in dynamic query

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<title>Select Slideshow Test</title>
<link type="text/css" rel="stylesheet" href="/floatbox/floatbox.css" />
<script type="text/javascript" src="/floatbox/floatbox.js"></script>
<style type="text/css">
<!--
body {
	background-color: #CCCCCC;
}
-->
</style>
</head>
<body>


  <cfdirectory
    directory="C:\newservers\History\slideshow\#ID#\"
    name="ImageDirectory"
    filter="*.jpg"
    sort="datelastmodified DESC">

 <cfoutput query="ImageDirectory"> 
<div align="left" class="floatbox" data-fb-options="doSlideshow:true navType:overlay slideInterval:3  group:Images caption:`Date: #ImageDirectory.datelastmodified#`">
 <a href="/slideshow/#ID#/#ImageDirectory.name#">Slideshow</a>
</div>
 </cfoutput>

</body>
</html>

Open in new window


There was no response to my question from the experts so I deleted it in hopes this time I might get some help, which is urgently needed.

I tried the floatboxjs.com forums and the administrator there seems to have big problems with ego and may not want to admit he has no answers, so, this seems to be our  only hope.

=============

We're using FLOATBOX in a dynamic page. Everything works fine but when the code is placed inside a CFOUTPUT query, the start image or start text is duplicated (seen more than once). It's a loop I can't seem to figure out. It's just a simple slideshow but I can't quite get how to get the entry into the slideshow from duplicating itself.

The images in the slideshow are named numerically, based on the INT 4 PK number in SQL 2000 database. So the output query is dynamically generated. I need the caption to be dynamically created also, as well as the name of the file so that's why it's included in the cfoutput query.

In this case I'm just using the output of a cfdirectory but I'll also insert the output of a matching database query to match the ID number, so don't worry about that. All I need is to figure out how to NOT display the start image or text (whichever I use for the user to start the slideshow) but not duplicate it as the CFOUTPUT is doing.

Hope this makes sense. Just have to figure out how to place the start of the slideshow so the start text or image is not shown more than once.

We're using cf8 and sql2000 and will not be upgrading.
 
See my snippet.
QsorbAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

James RodgersWeb Applications DeveloperCommented:
"In this case I'm just using the output of a cfdirectory but I'll also insert the output of a matching database query to match the ID number, so don't worry about that. All I need is to figure out how to NOT display the start image or text (whichever I use for the user to start the slideshow) but not duplicate it as the CFOUTPUT is doing."

nothing in what you have shown will cause a duplicate output, nested cfoutputs though might, show us the actual code.
0
QsorbAuthor Commented:
There are no nested cfoutputs, just the one cfoutput query, which displays each #ID# data type 4 PK, and if the start link is attached to one of them, naturally it will be repeated for each ID. I need to know a way to move the start link out of the loop but still allow the #ImageDirectory.datelastmodified# to be part of the loop so each ID displays the datelastmodified date, which is important for me to retain.

Does that help?
0
QsorbAuthor Commented:
Jester_48:  What do you mean, the actual code? I gave the actual code. Here it is again below:

This page is linked to from a FORM on a previous page and the numeric ID is passed. That ID is the PK INT 4 ID for each story/image. The ID number is the folder number for each story.

As an example, if the ID is 256, then we will be looking at the following folder to see if there  may be images for a slideshow;

C:\newservers\History\slideshow\253\"

If images are found in that directory, then the slideshow should begin when the user clicks on some start text or image. I want the user to have that choice so the slideshow does not auto start.

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<title>Select Slideshow Test</title>
<link type="text/css" rel="stylesheet" href="/floatbox/floatbox.css" />
<script type="text/javascript" src="/floatbox/floatbox.js"></script>
<style type="text/css">
<!--
body {
      background-color: #CCCCCC;
}
-->
</style>
</head>
<body>

I'll later first check to be sure the directory exists, but for now, let's assume it does.

  <cfdirectory
    directory="C:\newservers\History\slideshow\#ID#\"
    name="ImageDirectory"
    filter="*.jpg"
    sort="datelastmodified DESC">

 <cfoutput query="ImageDirectory">
<div align="left" class="floatbox" data-fb-options="doSlideshow:true navType:overlay slideInterval:3  group:Images caption:`Date: #ImageDirectory.datelastmodified#`">
 <a href="/slideshow/#ID#/#ImageDirectory.name#">Slideshow</a>
</div>
 </cfoutput>

</body>
</html>
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Gurpreet Singh RandhawaCEOCommented:
Hi,

Let's Discuss your issue from scratch, Can you show me some code online, if possible, or if not possible i would love to have files to check and create dummaty images what is goinf wrong!
0
QsorbAuthor Commented:
Looks like I had to solved the problem myself by trail and error. I'm still disappointed there was no solution from anyone and I had to put up with needless commentary which was no help at all. It appears to me that ColdFusion is all but dead here, at least not what it use to be.

This is the entire code. The ID is passed from a previous page and is just a number identifying the numbered folder where images exist to create the slideshow. The ID corresponds to the ID of a news story.  But that's not important to the function of the code.

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<title>Select Slideshow Test</title>
<link type="text/css" rel="stylesheet" href="/fb/floatbox.css" />
<script type="text/javascript" src="/fb/floatbox.js"></script>
<style type="text/css">
<!--
body {
      background-color: #CCCCCC;
}
-->
</style>
</head>
<body>



<!--- All this took was to reagrange the options correctly so that captions and variables work correctly and there is no duplicate of the SLIDESHOW text to begin the slideshow --->
<!--- The idea of this module is to create a slideshow from images fround in any identified directory --->
<!--- ID is set from calling page and is the Story ID (int 4 pk) --->
<!--- There are probably ways to improve this code but for what I was asking, this does it quite well --->


<cfif DirectoryExists("C:\ColdFusion8\wwwroot\History\slideshow\#ID#\")>
  <cfdirectory
    directory="C:\ColdFusion8\wwwroot\History\slideshow\#ID#\"
    name="SlideShowInfo"
    filter="*.jpg"
    sort="datelastmodified DESC">
</cfif>      
   
 
<div class="floatbox" data-fb-options="doSlideshow:true group:demo1">
   <cfoutput><a style="color:black" href="/slideshow/#ID#/#SlideShowInfo.name#" title="#SlideShowInfo.datelastmodified#" data-fb-options="caption:`Slideshow` caption2:`#SlideShowInfo.datelastmodified#`">Slideshow</a></cfoutput>
<cfoutput query="SlideShowInfo" startrow="2"><!--- To avoid showing the first image twice --->
   <a href="/slideshow/#ID#/#SlideShowInfo.name#" title="#SlideShowInfo.datelastmodified#" data-fb-options="doSlideshow:true group:demo1 caption:`Slideshow` caption2:`#SlideShowInfo.datelastmodified#`"></a>
</cfoutput>
 </div>

</body>
</html>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
QsorbAuthor Commented:
My own solution. I already gave the reason in my solution.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ColdFusion Language

From novice to tech pro — start learning today.