Forums
This topic is locked
Advanced Conditional Region
Posted 05 Jan 2004 07:51:39
1
has voted
05 Jan 2004 07:51:39 David Forshaw posted:
HiI just downloaded the Advanced Conditional Region extension from DMXZone.
Now I have applied it to a page to display or hide images based on whether
or not there is a entry for it in the database.
Now it works if there is no entry (blank space is the result, not the little
square with the red x).
But when there is a entry in the database it displays, but not the image,
just The little box with the red x.
Its in ASP VB with Access and heres the code.
<% if rsPropDetails.Fields.Item("image9".Value <>"" then ' Adv Conditional
Region %>
<img
src="<%=(rsPropDetails.Fields.Item("image9".Value)%>" width="102"
height="73">
<% end if '
rsPropDetails.Fields.Item("image9".Value <>"" %>
Basically all I want is for the image to show if the there is a entry in the
database and if not then dontt show anything.
Any Ideas?
Thanks Enzo
Replies
Replied 05 Jan 2004 11:20:46
05 Jan 2004 11:20:46 George Petrov replied:
the red x means that the path to your images in not correct. You are using the database field as image source but it must be preceeded with a path I suppose.
Greetings,
George
--------------------------------------------------
George Petrov - Founder of the Dynamic Zones
DMXzone.com, FWzone.net, FLzone.net, CFzone.net,
DNzone.com, FlashFreaks.nl
--------------------------------------------------
Greetings,
George
--------------------------------------------------
George Petrov - Founder of the Dynamic Zones
DMXzone.com, FWzone.net, FLzone.net, CFzone.net,
DNzone.com, FlashFreaks.nl
--------------------------------------------------
Replied 06 Jan 2004 00:36:29
06 Jan 2004 00:36:29 David Forshaw replied:
Thanks for the reply.
i understand that the red x means that the path is wrong but why is it that before I applied the advanced conditional region behaviour the images displayed fine, which indicates that the path is correct.
It has to be correct, Pure ASP upload wrote it to the database.
Are you sure that there is not something wrong in the code that I am using:
<% if rsPropDetails.Fields.Item("image9".Value <>"" then ' Adv Conditional
Region %>
<img
src="<%=(rsPropDetails.Fields.Item("image9".Value)%>" width="102"
height="73">
<% end if '
rsPropDetails.Fields.Item("image9".Value <>"" %>
Thanks for the help!
I appreciated it
David
i understand that the red x means that the path is wrong but why is it that before I applied the advanced conditional region behaviour the images displayed fine, which indicates that the path is correct.
It has to be correct, Pure ASP upload wrote it to the database.
Are you sure that there is not something wrong in the code that I am using:
<% if rsPropDetails.Fields.Item("image9".Value <>"" then ' Adv Conditional
Region %>
<img
src="<%=(rsPropDetails.Fields.Item("image9".Value)%>" width="102"
height="73">
<% end if '
rsPropDetails.Fields.Item("image9".Value <>"" %>
Thanks for the help!
I appreciated it
David
Replied 06 Jan 2004 02:02:56
06 Jan 2004 02:02:56 David Forshaw replied:
OK
Heres the deal!
I just went and hand coded another vrsion of a conditional region. This is a tried and trusted method that I have used before to great success.
It displays an image if there is something in the database, if there is not then i leaves it blank and no image is displayed.
But it still dont work with the page and database that I have. (made with pure ASP upload and smart image processor.
Any way here is the code that I wrote:
<%Dim image2
image2 = rsPropDetails.Fields.Item("image2".Value
IF image2 <>"" THEN%>
<img src="<%= Thumbnail("_thumb",(rsPropDetails.Fields.Item("image2".Value)) %>">
<%ELSE%>
<%End If%>
Now I checked the server and that image is there and so is the _thumb version that SIP created.
(C:\Inetpub\wwwroot\propertyMarket\upload\3__060104085347\im_1.jpg)
So why is it that without the Advanced Conditional region, or the version that I wrote that THE IMAGES DISPLAY CORRECTLY, but once the conditional region is added then THEY DONT DISPLAY CORRECTLY and a little white box with the dreaded red x appaers instead.
Im trying to be clear:
No conditional region = displays correctly
Conditional Region = RED X
If ANY ONE that can help me with this then that would be greatly appreciated.
Until then
Dave
Heres the deal!
I just went and hand coded another vrsion of a conditional region. This is a tried and trusted method that I have used before to great success.
It displays an image if there is something in the database, if there is not then i leaves it blank and no image is displayed.
But it still dont work with the page and database that I have. (made with pure ASP upload and smart image processor.
Any way here is the code that I wrote:
<%Dim image2
image2 = rsPropDetails.Fields.Item("image2".Value
IF image2 <>"" THEN%>
<img src="<%= Thumbnail("_thumb",(rsPropDetails.Fields.Item("image2".Value)) %>">
<%ELSE%>
<%End If%>
Now I checked the server and that image is there and so is the _thumb version that SIP created.
(C:\Inetpub\wwwroot\propertyMarket\upload\3__060104085347\im_1.jpg)
So why is it that without the Advanced Conditional region, or the version that I wrote that THE IMAGES DISPLAY CORRECTLY, but once the conditional region is added then THEY DONT DISPLAY CORRECTLY and a little white box with the dreaded red x appaers instead.
Im trying to be clear:
No conditional region = displays correctly
Conditional Region = RED X
If ANY ONE that can help me with this then that would be greatly appreciated.
Until then
Dave
Replied 06 Jan 2004 02:04:44
06 Jan 2004 02:04:44 David Forshaw replied:
Oh and I know that it says image2 and I have given im_1.jpg. But this is just an example.
Its correct from my end, Im just getting frantic when writting and looking for help!
Its correct from my end, Im just getting frantic when writting and looking for help!
Replied 06 Jan 2004 11:50:51
06 Jan 2004 11:50:51 George Petrov replied:
well you use two different methods to display the image! The Adv Cond region generates only a conditional if arround the image itself.
You can see that in your first case with adv cond region you have entered :
<img
src="<%=(rsPropDetails.Fields.Item("image9".Value)%>" width="102"
height="73">
while in your working case you have used the thumbnail function as well:
<img src="<%= Thumbnail("_thumb",(rsPropDetails.Fields.Item("image2".Value)) %>">
so thats is probably what is wrong
Greetings,
George
--------------------------------------------------
George Petrov - Founder of the Dynamic Zones
DMXzone.com, FWzone.net, FLzone.net, CFzone.net,
DNzone.com, FlashFreaks.nl
--------------------------------------------------
You can see that in your first case with adv cond region you have entered :
<img
src="<%=(rsPropDetails.Fields.Item("image9".Value)%>" width="102"
height="73">
while in your working case you have used the thumbnail function as well:
<img src="<%= Thumbnail("_thumb",(rsPropDetails.Fields.Item("image2".Value)) %>">
so thats is probably what is wrong
Greetings,
George
--------------------------------------------------
George Petrov - Founder of the Dynamic Zones
DMXzone.com, FWzone.net, FLzone.net, CFzone.net,
DNzone.com, FlashFreaks.nl
--------------------------------------------------