HTML5 Slideshow Support Product Page
In progress
HTML5 Slideshow If Statement
Reported 05 Jul 2011 09:19:58
1
has this problem
05 Jul 2011 09:19:58 Dan Berdusco posted:
Hi everyone, I am a big fan of the HTML5 Slideshow, and use it on a ton of sites. One thing I have run into though, is that I can't get it to not show up using an IF statement the same way I do for other objects, ie. images, text.
Instead, I get "ADODB.Fields error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal."
When I take out the IF statement, it just shows the large black box without an image in it when there is no image to show in the Slideshow. For all other objects, whatever I put in between the IF statement doesn't show up, just as it should. Is there something in the code that makes the IF statement not work correctly? There is one modification made, where I put in an IF statement to not show the text area at all when there is no text.
Any ideas on how to get the IF statement to remove the whole HTML5 Slideshow cleanly so nothing shows up?
THANK YOU! This will be a huge plus to figure out!
Here is the code for the section. The error happens on the first line.
<%If NOT (RS_MainPhoto.Fields.Item("SubContentActive").Value) = "True" Then %> </span><span class="verdana11_grey"> </span> <div class="dmxSlideshow minimalistic" id="MainPhoto" style="width:600px;height:380px"> < % While NOT RS_MainPhoto.EOF %> <div class="dmxSlide"> [img]dataimages/<%=(RS_MainPhoto.Fields.Item("PhotoImage").Value)%>" border="0" alt="" /> <div class="dmxDescription"> <%If NOT (RS_MainPhoto.Fields.Item("PhotoText").Value) = "" Then %> <p><%=(RS_MainPhoto.Fields.Item("PhotoText").Value)%></p> <% End If %> </div> </div> < % RS_MainPhoto.MoveNext() Wend %> <div class="dmxAbout">Generated by <a href="http://www.dmxzone.com/go?17708">HTML5 Slideshow Dreamweaver Extension</a> 1.0.4</div> </div> <script type="text/javascript"> // <![CDATA[ jQuery(document).ready( function() { jQuery("#MainPhoto").dmxHTML5Slideshow( {width:600, height:380, slide:{placement:"fill"}, description:{position:"bottom"}, kenburns:{enabled:false, start:{zoom:1}, end:{zoom:"1.05"}}} ); } ); // ]]> </script> <span class="verdana11_grey"> <% End If %>
Edited by - Trevor Flexhaug on 05 Jul 2011 09:41:57
Replies
Replied 07 Jul 2011 10:57:22
07 Jul 2011 10:57:22 Miroslav Zografski replied:
Hello Dan,
try this :
instead of :
try this :
If RS_MainPhoto.Fields.Item("SubContentActive").Value Then
instead of :
If NOT (RS_MainPhoto.Fields.Item("SubContentActive").Value) = "True" Then
Replied 27 Apr 2012 12:17:00
27 Apr 2012 12:17:00 Patrick Woldberg replied:
To check if recordset is not empty you should use
<%If Not RS_MainPhoto.EOF Then%>