Jump to content

Making a dynamic table element display as a link


rawky1976

Recommended Posts

Hello all

I have a Dreamweaver table setup as a repeating region that displays the results of a search (a search that you all helped me with last night!!!). Each cell shows elements of a record, and the first cell shows the field name document_name. I would like this to display as a link to the actual document.

All the documents are stored in the same folder Wwwroot\<sitename>\uploads. So I assume I can add this path as some kind of prefix to the href property and then add some fancy php code to add the actual document name and this format will continue throughout the repeating region for every record returned?

Thanks, Mark
Ok, I've got: -

<td colspan="3"><h4><span class="style1">Document Name:</span><br />
<a href="http://localhost/uploadtest/uploads/"><?php echo $row_rs_searchResults['document_name']; ?></a></h4></td>

I actually just added the link bit since you requested the code and thought "that's it, how obvious!" but when I tested I got: -

The website declined to show this webpage
HTTP 403 
  Most likely causes:
This website requires you to log in.

  What you can try:

Obviously I am logged in!?
OK, I'm impressed, that was a quick fix!

But since adding it my restrict access to page function ceased to work. Each time I 'previewed in browser' it made me login (which is what I want).

Now it just opens the page. I'll look into and get back to you if I need to.

Thanks, Mark

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.