|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
self varible
Author: Jim Davis
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32787#164482
As far as I've seen just leaving the Action blank will always self-submit -
correct?
Jim Davis
Exactally what I needed..
Thanks for the quick replies..
Was trying to figure out how to post a form to itself..
<form action="#GetFileFromPath(GetCurrentTemplatePath())#" method="post">
Seems to work, but is there a better or more correct way?
Author: techmike
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32787#164476
<bangs head off desk>
What a stupid oversight on my part.. Thanks!
-Mike
----- Excess quoted text cut - see Original Post for more -----
Author: Tony Weeg
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32787#164474
not sure what you mean?
is the page not parsing #cgi.script_name# ?
do you have <cfoutput></cfoutput> around it somewhere?
tw
Is this actually the best way to post a form to itself? What I'm running
into now is it works, however it appends to the end of the url whatever
the action is.
Example.
blah.com/test.cfm#CGI.SCRIPT_NAME#
-mike
----- Excess quoted text cut - see Original Post for more -----
Author: techmike
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32787#164472
Is this actually the best way to post a form to itself? What I'm running
into now is it works, however it appends to the end of the url whatever
the action is.
Example.
blah.com/test.cfm#CGI.SCRIPT_NAME#
-mike
----- Excess quoted text cut - see Original Post for more -----
Author: Alistair Davidson
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32787#164460
> <form action="#GetFileFromPath(GetCurrentTemplatePath())#"
method="post">
> Seems to work, but is there a better or more correct way?
Yes
That will only work if your file is in the root directory of your
website.
Try this instead -
<form action="#CGI.SCRIPT_NAME#" method="post">
Cheers,
Alistair Davidson
Senior Technical Developer
Headshift.com
Smarter, Simpler, Social
Author: Tony Weeg
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32787#164451
there is
<form action="#cgi.script_name#" method="post">
</form>
look @ my last reply.
there are myriad things to output, if you know what to output and what you
cant see, may be visible through those cfdumps.
tw
Exactally what I needed..
Thanks for the quick replies..
Was trying to figure out how to post a form to itself..
<form action="#GetFileFromPath(GetCurrentTemplatePath())#" method="post">
Seems to work, but is there a better or more correct way?
-Mike
----- Excess quoted text cut - see Original Post for more -----
Author: Pascal Peters
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32787#164450
<form action="#CGI.SCRIPT_NAME#">
The code below will not work inside a cfinclude, Custom tag, ...
----- Excess quoted text cut - see Original Post for more -----
Author: techmike
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32787#164449
Exactally what I needed..
Thanks for the quick replies..
Was trying to figure out how to post a form to itself..
<form action="#GetFileFromPath(GetCurrentTemplatePath())#" method="post">
Seems to work, but is there a better or more correct way?
-Mike
----- Excess quoted text cut - see Original Post for more -----
Author: Tony Weeg
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32787#164441
also you may want to try
<cfdump var="#cgi#">
just to see what other variables are out there.
and while your at it...
<cfdump var="#session#">
<cfdump var="#server#">
<cfdump var="#application#">
<cfdump var="#form#">
<cfdump var="#url#">
<cfdump var="#client#">
just to see what else is there and available.
I have those all cfdumped in my onRequestEnd.cfm file if the website visitor
is my ip address, for most of my sites, so I can always see what vars are
there and working.
tw
>> Is there a self varible in coldfusion? much like $PHP_SELF if your
functions...
getBaseTemplatePath()
getTemplatePath()
--
dc
Author: Greg Landers
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32787#164438
Take at all of the CGI variables. Some really good and useful stuff there.
I use #cgi.SCRIPT_NAME# frequently. Sounds like this would output what you are
wanting.
Greg
Its the coldfusion noob again here..
Is there a self varible in coldfusion? much like $PHP_SELF if your
familier with that..
So, if the varible were used in blah.cfm, the content of it would be just
blah.cfm.
-Mike
Author: Raymond Camden
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32787#164439
Do you mean the current file name? If so, you can use
getCurrentTemplatePath(), which returns the full path, and if you want just
the file, use getFileFromPath...
<cfoutput>
#getFileFromPath(getCurrentTemplatePath())#
</cfoutput>
Author: Pascal Peters
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32787#164436
#GetFileFromPath(GetCurrentTemplatePath())#
----- Excess quoted text cut - see Original Post for more -----
Author: d.a.collie
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32787#164434
>> Is there a self varible in coldfusion? much like $PHP_SELF if your
functions...
getBaseTemplatePath()
getTemplatePath()
--
dc
Author: techmike
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32787#164431
Its the coldfusion noob again here..
Is there a self varible in coldfusion? much like $PHP_SELF if your
familier with that..
So, if the varible were used in blah.cfm, the content of it would be just
blah.cfm.
-Mike
|
May 24, 2012
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||