Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
gfhdfhfgh #1
Dynamic URL . <cfLocation url = ..............
I use Navigation bar on the page from Dreamweaver (First-Next-Previous-Last).
I go to some page in the middle (for example page2:
[url]http://localhost:8500/CMS/categoryRedact.cfm?PageNum_Recordset2=1&record ID=1[/url]
) I want to edit some record on this page. I click icon ?Edit? to get page
with Form to update this record. After updating this record I use
<cflocation url='categoryRedact.cfm?recordID=#FORM.ProduitsID# '> to return to
the page where was this record to check if record was updating. And I always
get the First pagehttp://localhost:8500/CMS/categoryRedact.cfm?recordID=1 when
I need the second (or third or others).:confused; How can I write dynamic
cflocation url so that I will always return to the right page where updating
record was? Please help.Thank you. :) Svetlana
gfhdfhfgh Guest
-
CFlocation.
I?m interested to know whether it?s good practice to write long CF coded pages or segment CF code into several different CF pages and use cflocation... -
cflocation and 301 redirects
It works for me... Add CFABORT after your CFHEADER tag -- probably a CFLOCATION tag is executing after your CFHEADER tags and overwriting your... -
cflocation and 301 redirects
I am looking for the same solution. When I try: <cfheader statusCode="301" statusText="Moved Permanently"> <cfheader name="Location"... -
cflocation
Does anyone know a way to use cflocation to load a page into a specific target within a frameset? I am working with multiple framesets and I am... -
CFLocation and SSL
I am moving someone on a site from a form on an http or https. I post to a page that queries a DB and then redirects based upon the form post. The... -
jdeline #2
Re: Dynamic URL . <cfLocation url = ..............
You need to bracket your CFLOCATION tag with a CFOUTPUT since you want to pas the value of FORM.ProduitsID.
jdeline Guest
-
vkunirs #3
Re: Dynamic URL . <cfLocation url = ..............
Hi
after updating the data you are redirecting the page using the cflocation
...right?
check in the querystring whats the value you are getting.
if you are getting 1 then it will take to you the first page.
try to pass the another number and check it out...whether the page is coming
or not..
vkunirs Guest
-
gfhdfhfgh #4
Re: Dynamic URL . <cfLocation url = ..............
2 jdeline Thank you for the idea with CFOUTPUT . Can you give me please some
example code how to do this? 2 vkunirs Yes, it is. How I already wrote I get
the page [url]http://localhost:8500/CMS/categoryRedact.cfm?recordID=1[/url] It
means I have to be on the First page if recordID=1 because value of
#FORM.ProduitsID# is one. But I have Products with #ProduitsID# = 1 on the
few pages with navigation. What I have to add to this code <cflocation
url='categoryRedact.cfm?recordID=#FORM.ProduitsID# '> to redirect me inside
value #ProduitsID# = 1 on the second or third page? Thank you
gfhdfhfgh Guest
-
gfhdfhfgh #5
Re: Dynamic URL . <cfLocation url = ..............
To make things more understandable . Actualy I use this standart Navigation
bar from Dreamweaver -----------------------------------
<cfset MaxRows_Recordset2=3>
<cfset
StartRow_Recordset2=Min((PageNum_Recordset2-1)*MaxRows_Recordset2+1,Max(Recordse
t2.RecordCount,1))>
<cfset
EndRow_Recordset2=Min(StartRow_Recordset2+MaxRows_ Recordset2-1,Recordset2.Record
Count)>
<cfset
TotalPages_Recordset2=Ceiling(Recordset2.RecordCou nt/MaxRows_Recordset2)>
<cfset QueryString_Recordset2=Iif(CGI.QUERY_STRING NEQ
"",DE("&"&CGI.QUERY_STRING),DE(""))>
<cfset
tempPos=ListContainsNoCase(QueryString_Recordset2, "PageNum_Recordset2=","&")>
<cfif tempPos NEQ 0>
<cfset
QueryString_Recordset2=ListDeleteAt(QueryString_Re cordset2,tempPos,"&")>
</cfif>
-------------------------------
<table border="0" width="50%">
<cfoutput>
<tr>
<td width="23%" align="center"> <cfif PageNum_Recordset2 GT 1>
<a
href="#CurrentPage#?PageNum_Recordset2=1#QueryStri ng_Recordset2#">First</a>
</cfif> </td>
<td width="31%" align="center"> <cfif PageNum_Recordset2 GT 1>
<a
href="#CurrentPage#?PageNum_Recordset2=#Max(Decrem entValue(PageNum_Recordset2),1
)##QueryString_Recordset2#">Previous</a>
</cfif> </td>
<td width="23%" align="center"> <cfif PageNum_Recordset2 LT
TotalPages_Recordset2>
<a
href="#CurrentPage#?PageNum_Recordset2=#Min(Increm entValue(PageNum_Recordset2),T
otalPages_Recordset2)##QueryString_Recordset2#">Ne xt</a>
</cfif> </td>
<td width="23%" align="center"> <cfif PageNum_Recordset2 LT
TotalPages_Recordset2>
<a
href="#CurrentPage#?PageNum_Recordset2=#TotalPages _Recordset2##QueryString_Recor
dset2#">Last</a>
</cfif> </td>
</tr>
</cfoutput>
</table>
gfhdfhfgh Guest



Reply With Quote

