Skip to main content
Known Participant
May 3, 2008
Question

Making HTML <a name="??"> work in CFM

  • May 3, 2008
  • 1 reply
  • 614 views
Ok, this should be SO simple. Never done it in CF.
Add normal links, database derived ... <a href="#number#"> and sprinkle through a summary.
Then use a URL like

example.cfm?parm1=a&parm2=b#1
or example.cfm?parm1=a&parm2=b&#1
or example.cfm?parm1=a&parm2=b&##1
or example.cfm#1?parm1=a&parm2=b&##1

Simply cannot get it to work. What obvious thing am I overlooking.
using IE and Firefox.

Cheers

Robert
    This topic has been closed for replies.

    1 reply

    May 4, 2008
    If your links are within a <CFOUTPUT> block, the # character indicates that the following characters are a CF variable. You need to escape the # by using ## instead. Try using
    example.cfm?parm1=a&parm2=b##1
    or example.cfm##1?parm1=a&parm2=b##1
    Inspiring
    May 4, 2008
    <cfoutput>
    <a href="#number#">
    </cfoutput>

    or

    <a href="<cfoutput>#number#</cfoutput>">

    The other links need escaping:

    <cfoutput>
    example.cfm?parm1=a&parm2=b##1
    </cfoutput>


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


    "cf_code_warrior" <webforumsuser@macromedia.com> wrote in message news:fvkc2s$jqa$1@forums.macromedia.com...
    > Thanks djeline
    >
    > However, if you look at my example I already tried escaping them.
    >
    > Robert
    >