Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
H3ath0r #1
Delay cflocation
I would like visitors to view a "thank you for your submission" message before being redirected to another URL.
Is there any way to delay the processing of a cflocation tag?
H3ath0r 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... -
What does a session have to do with <cflocation>
<cflock name="URLToken_lock" type="readonly" timeout="30"> <cflocation url="successful_signin.cfm?#session.URLToken#" addtoken="No"> </cflock> -
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... -
Delay before cflocation
Some browsers may have Meta Refresh disabled, which may present a problem to users if there is a broad user base. Are there any alternatives to... -
BSterner #2
Re: Delay cflocation
You can use javascript to accomplish this.
There's an example below. Check out
[url]http://www.devguru.com/Technologies/ecmascript/quickref/win_settimeout.html[/url] for
documentation.
<html>
<head>
<script type="text/javascript">
var timeout = 3000;
function displayMessageAndTimeout()
{
var redirect = confirm("Session is over. Redirect to Yahoo?");
if (redirect) location.href="http://www.yahoo.com";
else alert("Ok, I won't send you anywhere.");
}
</script>
</head>
<body onLoad="javascript:setTimeout('displayMessageAndTi meout()', timeout);">
After <script language="javascript">document.write(timeout/1000);</script>
seconds, an alert will appear.
</body>
</html>
BSterner Guest
-
H3ath0r #3
Re: Delay cflocation
Well, yes, okay. But if we're gonna go javascript, then how about the smoother
version where you automatically get transferred after a 5 second delay and the
user gets the ubiquitous "Click here if you are not automatically transferred
to www.location.com"
H3ath0r Guest
-
H3ath0r #4
Re: Delay cflocation
Going to use the ol' meta refresh:
<META http-equiv="refresh" content="10; URL=http://www.website.com">
H3ath0r Guest
-
CFDEBUG #5
Re: Delay cflocation
you could use
<meta http-equiv=refresh content="2;URL=http://www.location.com">,here 2 is 2
seconds delay before it loads the url.
And then add code to the same page like
If the transfer does not start automatically then click <a
href="http://www.location.com"> here</a>
CFDEBUG Guest
-
reactionnetworks #6
Re: Delay cflocation
You could also use this to pause:
<cfparam name="attributes.interval" default="10"/> <!--- 10 Sec Pause --->
<cfscript>
thread = createObject("java", "java.lang.Thread");
thread.sleep(javaCast("long", 1000*attributes.interval));
</cfscript>
reactionnetworks Guest



Reply With Quote

