This topic is locked

File Based Image As a Hyperlink

1/21/2006 6:44:12 PM
PHPRunner General questions
A
Alan4573 author

Hi,
Anyone know how to set a file based image as a hyperlink.
Basically, what I want to do is have a master table holding thumbnail images (image paths).

I will have another table with larger versions along with some text (descriptions etc).
The idea is for the user to click on the thumbnail which then takes the user to the detail page (larger version). I want the image clickable and not a seperate "Details" link.
It is basically the master detail set, but achieved by clicking on the image and not a "Details" link.
Can this be done with PHPRunner?
Thanks
Alan

Sergey Kornilov admin 1/23/2006

Alan,
you can modify generated List page to make this.

Either add the code that displays details link to your file-based image field code or

add the image to details table hyperlink.
The code that displays details hyperlink looks like this:

<a href="details_list.php" onClick = "document.forms.details.action='details_list.php';document.forms.details.masterkey.value='<?php echo db_addslashes($data[RemoveFieldWrappers("ID")]);?>'; document.forms.details.submit();return false;">


The file-based image displaying code starts with this line:

if(CheckImageExtension($data["field"]))