Linking to a Page URL from a dynamic page

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Linking to a Page URL from a dynamic page

    Hello I have an Access db table which contains a field called URL. I have
    previously <cfset display_url = #rsListHistory.URL#>. When I display the list
    of records I am successfully showing the correct URL to click in order to call
    the required .cfm page. The code that I am using is listed below. The URL of
    the page is [url]http://www.dalston.org.uk/History/index.cfm[/url]. I have 2 dynamically
    displayed items and the each show the correct URL link to the required page.
    However, when you click on the second link it displays the page from the first
    link. Obviously something is missing in the CF code in relation to the
    display_url variable. I would appreciate some pointers to solve this. Also,
    and very much related, how do I avoid showing the URL? I would prefer to show
    a bit of text like 'Click for Item', but the underlying link would go to the
    correct URL which is held in the History.URL (the URL field in the Access
    database). Your help will be appreciated. Ronnie

    <cfoutput query="rsListHistory" startRow="#StartRow_rsListHistory#"
    maxRows="#MaxRows_rsListHistory#">
    <tr>
    <td><cfif rsListHistory.RecordCount GT 0>
    <font size="2" face="Arial, Helvetica,
    sans-serif">#rsListHistory.Topic#</font> </cfif></td>
    </tr>
    <tr>
    <td><font size="1" face="Arial, Helvetica,
    sans-serif"><a href=#display_url#>#rsListHistory.URL#</a></font></td>
    </tr>
    <tr>
    <td><hr></td>
    </tr>
    </cfoutput>

    Caldew Guest

  2. Similar Questions and Discussions

    1. Trouble linking from web page to specific page in a PDF
      I'm having trouble linking to specific pages within a pdf. I've tried using page #'s and creating destinations in the pdf (my destination is called...
    2. Dynamic XML page styled with XSL page
      I cannot make the XSL file create dynamic links properly. I wanted to link a dynamic field to another dynamic field. I can make this much happen,...
    3. linking to a page
      I want to give some background information first: I am making an online book selling/trading for a small group of people. They can request a...
    4. linking to items on a page
      I've been trying to find out how to link from the top of a page to an item on the page. I have a book list, and I want to put a list of the...
    5. Dynamic page generation page examples?
      Hoping to add a "generate your own web service" feature to my application. I have been searching MSDN and other places for an example of .NET code...
  3. #2

    Default Re: Linking to a Page URL from a dynamic page

    Hi Ronnie, When you set display_URL outside of the CFOUTPUT query loop, you
    set it equal to the value of the field in the first record of the query
    results. That won't change in your output. Just use the straight value from
    the record. HTH,

    philh Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139