473,396 Members | 2,009 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

CFIF Question

On a listing page, I'm trying to display Charts thumbnails and Thumb picture if there's one available. So I need an CFIF statement similar to this: If there's a thumb, show it, otherwise show chart.

Here's what I got so far:

Expand|Select|Wrap|Line Numbers
  1. <cfif Len(Trim(ImageThumb))>
  2.                             <div style="float:left; ">
  3.                             <a href="#itemLink#" #sTarget# class="N#cfs##cst#">
  4.                             <cfscript>
  5.                                 // deinfe argument structure
  6.                                 strArgs = StructNew();
  7.  
  8.                                 //Application.DynamicTagGenerator
  9.                                 strArgs.sRelativePath = ImageThumb;
  10.                                 strArgs.sFileName = "";
  11.                                 strArgs.sAlternateImagePath = "#request.ImagePath#AcuCustom/#request.appTitle#/Icon/Thumbnail/";
  12.                                 strArgs.bEnforceDesignStyle = "#CurrentEnforceImageSizeYN#";
  13.                                 strArgs.sWidth = "#currentThumbWidth#";
  14.                                 strArgs.sHeight = "#currentThumbHeight#";
  15.                                 strArgs.sAltText = "#HTMLEditFormat(Title)#";
  16.                                 strArgs.bGenerateTag = 1;
  17.  
  18.                                 sImageThumb = Application.DynamicTagGenerator.GetImageTag(argumentCollection = strArgs);
  19.                             </cfscript>
  20.                             #sImageThumb#
  21.                             </a>
  22.                             </div>
  23.  
  24. <cfelse>
  25.                                 <!--- Container for the chart --->
  26.                                 <div id="chartStandardItemContainer#currentRow-1#" class="chartStandardItemContainer" style="width:170px; height:100px; margin-right:15px; margin-bottom:10px""></div>
  27.                 </td>
  28.                 </cfif>
It show the chart for those article that has it but when it comes to the thumb, it does appear but the statement wont run for the article below that.

Any suggestion?

Regards
Oct 21 '11 #1
1 2208
acoder
16,027 Expert Mod 8TB
Could you explain what you mean by "but the statement wont run for the article below that"? Which line numbers are you referring to in your code?
Oct 22 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Mohammed Mazid | last post by:
Can anyone please help me on how to move to the next and previous question? Here is a snippet of my code: Private Sub cmdNext_Click() End Sub Private Sub cmdPrevious_Click() showrecord
3
by: Stevey | last post by:
I have the following XML file... <?xml version="1.0"?> <animals> <animal> <name>Tiger</name> <questions> <question index="0">true</question> <question index="1">true</question> </questions>
7
by: nospam | last post by:
Ok, 3rd or is it the 4th time I have asked this question on Partial Types, so, since it seems to me that Partial Types is still in the design or development stages at Microsoft, I am going to ask...
3
by: Ekqvist Marko | last post by:
Hi, I have one Access database table including questions and answers. Now I need to give answer id automatically to questionID column. But I don't know how it is best (fastest) to do? table...
10
by: glenn | last post by:
I am use to programming in php and the way session and post vars are past from fields on one page through to the post page automatically where I can get to their values easily to write to a...
56
by: spibou | last post by:
In the statement "a *= expression" is expression assumed to be parenthesized ? For example if I write "a *= b+c" is this the same as "a = a * (b+c)" or "a = a * b+c" ?
2
by: swapnagg | last post by:
I am using cold fusion 8 to develop forms. I need to check if user has entered a value of type "text". If not then a message has to Cfoutput. i am using the following code: <cfif not...
2
by: ndeeley | last post by:
Hi there, Having problems with a cfif query based on the value of a check box. I have an input type="file" field on a form. This allows the user to choose a file and upload the location to the...
6
semanticnotion
by: semanticnotion | last post by:
Hi sir i want to transform the data of one table into another through foreign key but the following error come to my browser Here is my code and data base structure. CREATE TABLE IF NOT...
2
by: brian williams | last post by:
I have a problem where the Approved value (SQL) has a 1,0 or NULL value. I can not figure out how to show the null value when returned for the filtered input. <cfset vApproved = 0> <cfif...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.