Ask a Question related to Coldfusion - Getting Started, Design and Development.
-
Glenn Holliday #1
Adding parameters to URL with fragment
This is a topic I thought I'd find in the docs, but haven't.
I've also searched these newsgroups, but it hasn't come up
recently. Please point me to the appropriate document ...
From a form, I'm posting the same .cfm file a second time.
I have parameters, which at the moment I'm including in the
URL, as
a.cfm?parm1=a&parm2=b
When CF (MX 6.1 on Apache and Windows 2000) redisplays the document,
I also want it to display a fragment within the HTML document,
so the URL also includes a fragment identifier, like
a.cfm#loc?parm1=a&parm2=b
CF doesn't seem to like this syntax. The document displays at the
top of the document, rather than at the location of the fragment,
and the parameters are undefined.
From the standards, this appears to be the right syntax to use.
I tried the other way around
a.cfm?parm1=a&parm2=b#loc
(escaping the # in the CF code so I get the single # I want in the
generated URL), but CF then interprets the #loc as part of the last
parameter. I think, from the standard, that way around is incorrect
anyway.
I can get around this by using form parameters rather than
URL parameters. I would like to understand what's happening and
how to get it right with the parameters in the URL.
Thanks!
--
Glenn Holliday [email]holliday@acm.org[/email]
Glenn Holliday Guest
-
Adding Dynamic User Control WITH PARAMETERS
Is there a way to dynamically add a user control to a page, AND before the page_load of the user control fires, that you have some of the public... -
adding parameters
i have a datagrid set up with a parameter @User which calls from the database all of a users contacts and places them in the grid. each contact... -
fragment caching problem
I have a custom control that generates client scripts and uses viewstate This control is placed in a user control that is placed in my application... -
html fragment use
This code won't display anything. The link will be in the code but you have nothing to click and engage it. The code you have here is just the back... -
HTML Fragment
I have inserted some HTML fragments. One was a small banner which worked fine, but none of the others see to work. I checked to be sure that it... -
MikerRoo #2
RE: Adding parameters to URL with fragment
"a.cfm?parm1=a&parm2=b#loc" is the correct syntax.
I use this, all the time, to jump to anchors in my pages -- and the anchor
name does not get added to any URL variable.
What CF version are you running? Webserver?
Please post the code that generates the URL.
MikerRoo Guest
-
Glenn Holliday #3
Re: Adding parameters to URL with fragment
Glenn Holliday wrote:
Got it figured out. The CF form was using the HTML form action>
> This is a topic I thought I'd find in the docs, but haven't.
> I've also searched these newsgroups, but it hasn't come up
> recently. Please point me to the appropriate document ...
>
> From a form, I'm posting the same .cfm file a second time.
> I have parameters, which at the moment I'm including in the
> URL, as
>
> a.cfm#loc?parm1=a&parm2=b
>
> CF doesn't seem to like this syntax. The document displays at the
> top of the document, rather than at the location of the fragment,
> and the parameters are undefined.
to re-post the form several times, to handle several states in
a use case. I hadn't yet found that one time it was actually
using <CFLOCATION> rather than posting from the form.
It appears to be the <CFLOCATION> that does not like combining
parameters and fragments. Once I replaced that with a more
ordinary post from a form action, everything was well.
--
Glenn Holliday [email]holliday@acm.org[/email]
Glenn Holliday Guest



Reply With Quote

