Skip to main content
Participant
February 19, 2009
Question

go to: Internal document id?

  • February 19, 2009
  • 1 reply
  • 1015 views
Hello all,
I'm trying to implement the ability to return to a specific location in a document after a sub-form closes. I am using <a id="row#x#"> values in the form and have tried to do the equivalent of a simple "blah.cfm?var=val#row" call and also attempted to use an onload="gotorow('#row#')". The problem is that none of this seems to be working. I am using a hidden field on the main form that contains the value after having been submitted from the sub-form. The values are correct and I can see in the source that everything looks fine. I'm wondering if this is a problem with the page not being rendered yet by the server so the methods I'm using don't yet know where to go? Thinking this may be the case, I also tried adding a javascript block just before the end of the form that would call the gotorow() function. Maybe I'm way off, but is there a simple method to implement this sort of feature?
Thanks!
Mark
    This topic has been closed for replies.

    1 reply

    Inspiring
    February 19, 2009
    This would probably be clearer if I was looking at some actual code you
    have written, but I'm guessing from the vague description that you are
    not properly coding an anchor and a link to one.

    <a id="row#x#"> is not linked to by a url that looks like
    blah.cfm?var=val#row#. It would be linked to by a url that lookes like
    blah.cfm#row#x#.

    With the double meaning of the hash (#) character in this link you have
    to be careful about which ones are delimiting the variable 'x' and which
    one is identifying the id of an anchor. You may have to escape the
    latter by doubling it 'blah.cfm##row#x#, depending on where you have put
    the <cfoutput>...</cfoutput> tags.