Developer Forums Previous Topic Next Topic
Title:
Hide the view link for records with no links

Content:
Sometimes when you add a Website/URL field to a table, but don't put anything in that field, the view link still shows up. If you click on it, it just goes to your default website link.

It is possible to prevent the view link from showing up if there is no website specified for the field. To do that, you'll need to edit the field template for the column. When you are viewing your data in the grid view, select Design > Field Templates.

Click the edit icon next to the column with the websites and paste this code into the template field:

<script>if ('[DATA]'!='') document.write('<a href="[DATA]" title="[DATA]">view</a>');</script>

What this says, is "If something is in the field, then write the hyperlink, otherwise do nothing."

replies



createdate:
8/21/2008 4:02:19 PM

createid:
pj