• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfgrid problem

Guest
Sep 02, 2008 Sep 02, 2008

Copy link to clipboard

Copied

Hi All,

I am using a cfgrid bound to a cfc to populate it with data in CF8. All is working well.
One of the columns in the grid contains a string which are urls without the "http : // www."
All I want to be able to do is to allow users to click on these links so they are taken to the page.
In the cfgrid I have "appendkey=no" so no url vars are added, and in the cfgridcolumn tag I have the href attribute "href=pmcname" which is the column var containg the links.

But....of course without the " http : //www."the links are going nowhere (or a trying tio find the link as a page on my own domain). I know I could add the prefix after the query in the cfc but I don't want to display the prefix in the table.

Any ideas please?

Thanks
TOPICS
Advanced techniques

Views

287

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 03, 2008 Sep 03, 2008

Copy link to clipboard

Copied

LATEST
In your Select in the CFC select an additional column that is strung together with the http://www. like so...

SELECT ' http://www.' + LINK AS URL_LINK

Then add the URL_LINK as a grid column but set it to not display.
<cfgridcolumn name="URL_LINK" header="URL_LINK" display="no" />

Finally, set the href for the column that you want to be linked to "URL_LINK"

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation