Can someone please help combine these two so I can have a "loading" page until the page redirects?
Thank you in advance.
ColdFusion Language
Last Comment
_agx_
8/22/2022 - Mon
SidFishes
You can't really do it with cflocation. That does a 302 redirect and as soon as the client browser gets the header it moves to the redirect location without processing any more on the page.
something like this may be what you are looking for
but I don't really understand the need. Once you've kicked off a new page load, the browser focus should go to the new page. It's what people expect.
nirsait
ASKER
Thank you for the update.
Actually I would 'think' it should just do a quick page load to the 'redirect' URL. However, it usually sits as it waits to find a load the other page. Hence the reason for wanting som sort of page 'loading' until is actually does a redirect.
Using the META version of the redirect, looses any information in the #client.ID# area so it kicks back an error with the 'MemberID='
So this is still not working properly.
Thank you.
SidFishes
"looses any information in the #client.ID# area"
No reason it should do that. Do you have the tag surrounded by <cfoutput>?
"sort of page 'loading' until is actually does a redirect."
The thing is that with the meta content set to 0, the redirect happens -immediately-. Replace the url with google.com - you probably won't even see the loading image.
I think what you're talking about is page load time - which is a different thing entirely.
No, I do not have the tag surrounded by <cfoutput>. The information being sent is:
<cfif isdefined("client.ID") and trim(client.ID) gt "">
<cflocation url="/testing/SVSSOWeb1.asp?MemberID=#client.ID#" addtoken="no">
</cfif>
Then from the receiving ASP page I am pulling the information in as:
MemberID = Request.querystring("MemberID")
Using the META version, it is not picking up any #client.ID# information.
I am trying to wrap a 'Page Loading' concept around this <cfif>...<cflocation>... concept since the page actually takes a bit load and redirect. so if there is any other way to do that it would be great. If not, then the page will just load slowly until it redirects.
_agx_
(no points ...)
Using the META version, it is not picking up any #client.ID# information.
You need cfoutput tags. It's because META isn't a CF tag so the #client.ID# variable won't be evaluated unless you include them.
<cfif isdefined("client.ID") and trim(client.ID) gt "">
What do you want to happen if neither of those is true? I assume you're anticipating/handling that scenario.
something like this may be what you are looking for
<span id="loading">
<img src="ajax-loader.gif" alt="please wait"> ... Loading ...
</span>
<META HTTP-EQUIV=Refresh CONTENT="0; URL=http://yoursite/testing/SVSSOWeb1.asp?MemberID=#client.ID#">
but I don't really understand the need. Once you've kicked off a new page load, the browser focus should go to the new page. It's what people expect.