CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 HREF server files in grid imagelink

Print topic Send  topic

Author Message
jpflana

Posts: 13
Posted: 01/05/2006, 10:03 AM

I'm working on a photo gallery and have staightened most of the kinks but now I'm having HREF problems. In my first trial I manually entered a pathname in my database and the thumbnail's "Href Source" pointed to that for the picture link. Through past posts I figured out how to add my path (gallery/) in front of the image's "SRC" instead of having the path saved in the database. Now I can't figure out how to make the link's HREF work without manually saving the path in the database.

In the Href Source you either have to put in a static address (which won't work for multiple records) or link to a database field. Is there any way to combine the two and add a "gallery/" in front of the database field result?

Here's the ASP generated code to access the database.

gallery_thumb.Page = Recordset.Fields("photo_id")

I'd rather find out a solution in CCS instead of having to hardcode a fix every time, but if that's what I need to do, please help me with the code.

Thanks.
View profile  Send private message
DonB
Posted: 01/05/2006, 8:39 PM

Set the Link to have the Data Source type of "Database Expression", then put
in a 'concatenated' string using the syntax of your particular database.
For MySQL it would be

CONCAT('gallery/',photo_id) AS photo_id

for others it may be (or some variation of)

'gallery/' + photo_id AS photo_id.

--
DonB

http://www.gotodon.com/ccbth


"jpflana" <jpflana@forum.codecharge> wrote in message
news:243bd5f89f01cf@news.codecharge.com...
> I'm working on a photo gallery and have staightened most of the kinks but
now
> I'm having HREF problems. In my first trial I manually entered a
pathname in
> my database and the thumbnail's "Href Source" pointed to that for the
picture
> link. Through past posts I figured out how to add my path (gallery/) in
front
> of the image's "SRC" instead of having the path saved in the database.
Now I
> can't figure out how to make the link's HREF work without manually saving
the
> path in the database.
>
> In the Href Source you either have to put in a static address (which won't
work
> for multiple records) or link to a database field. Is there any way to
combine
> the two and add a "gallery/" in front of the database field result?
>
> Here's the ASP generated code to access the database.
>
> gallery_thumb.Page = Recordset.Fields("photo_id")
>
> I'd rather find out a solution in CCS instead of having to hardcode a fix
every
> time, but if that's what I need to do, please help me with the code.
>
> Thanks.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.