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

Setting up a link

Participant ,
Apr 24, 2008 Apr 24, 2008
I put my query output in a table :
<td>#qry.field_name#</td>

How do I create a link for this ? Using <td><a href="#qry.field_name#"></a></td> does not work.
If I click on the value inside #qry.field_name#, I want to take that value and open another page. It seems simple enought, but I cannot seem to get it to work.

Thanks for any help.
313
Translate
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
LEGEND ,
Apr 24, 2008 Apr 24, 2008
This will take you to a page that has the same name as qry.field_name

<cfoutput>
<td><a href="#qry.field_name#">#qry.field_name#</a></td>
<cfoutput>

This would take you to a page named somepage.cfm and add a URL parameter of
id to it:

<cfoutput>
<td><a href="somepage.cfm?id=#qry.field_name#">#qry.field_name#</a></td>
<cfoutput>


--
Ken Ford
Adobe Community Expert - Dreamweaver
Fordwebs, LLC
http://www.fordwebs.com


"trojnfn" <webforumsuser@macromedia.com> wrote in message
news:fur876$hie$1@forums.macromedia.com...
>I put my query output in a table :
> <td>#qry.field_name#</td>
>
> How do I create a link for this ? Using <td><a
> href="#qry.field_name#"></a></td> does not work.
> If I click on the value inside #qry.field_name#, I want to take that value
> and
> open another page. It seems simple enought, but I cannot seem to get it to
> work.
>
> Thanks for any help.
>

Translate
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
Participant ,
Apr 27, 2008 Apr 27, 2008
I tried that and it did not work.

My qry.field_name is a pdf, gif, or jpg file, stored in a column in a table.

What I want to do is display the file name after I query the table: <td>#qry.field_name.pdf#</td>

If I click on the qry.field_name.pdf, I want to open the pdf file, if it is qry.field_name.jpg, the open the jpg file, etc.,
that is why I need to setup the link.

What else can I do to display ?
Translate
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
LEGEND ,
Apr 28, 2008 Apr 28, 2008
LATEST
quote:

Originally posted by: trojnfn
I tried that and it did not work.

My qry.field_name is a pdf, gif, or jpg file, stored in a column in a table.

What I want to do is display the file name after I query the table: <td>#qry.field_name.pdf#</td>

If I click on the qry.field_name.pdf, I want to open the pdf file, if it is qry.field_name.jpg, the open the jpg file, etc.,
that is why I need to setup the link.

What else can I do to display ?

If you are storing the files in your database, I don't think you can open them with a web browser. What most people do is to store the file as a file somewhere, and store the path to in their db.
Translate
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
LEGEND ,
Apr 28, 2008 Apr 28, 2008
What, exactly, is stored in the table.

Can you give me an example of what it looks like?

Are they stored in another folder?

--
Ken Ford
Adobe Community Expert - Dreamweaver
Fordwebs, LLC
http://www.fordwebs.com


"trojnfn" <webforumsuser@macromedia.com> wrote in message
news:fv3k0j$bh3$1@forums.macromedia.com...
>I tried that and it did not work.
>
> My qry.field_name is a pdf, gif, or jpg file, stored in a column in a
> table.
>
> What I want to do is display the file name after I query the table:
> <td>#qry.field_name.pdf#</td>
>
> If I click on the qry.field_name.pdf, I want to open the pdf file, if it
> is
> qry.field_name.jpg, the open the jpg file, etc.,
> that is why I need to setup the link.
>
> What else can I do to display ?
>

Translate
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