Solved

Problem with page refresh

Posted on 2000-03-14
13
162 Views
Last Modified: 2013-12-24
I am passing variables in to my page using the url variable. When I refresh the page manually (F5) this works fine but when the page refreshes using the meta refresh the variables are not passed and the page is blank.I have tried putting <cfoutput> tags round the meta refresh but it produces an error.

This is the meta refresh:
<meta http-equiv="Refresh" content="240;url=http://server/frame_sets/Customers.cfm?Router=#url.Router#&TimeSpan=#url.TimeSpan#">

When the page is first called, the variables are passed from a Form on the previous page.
0
Comment
Question by:nido
  • 5
  • 3
  • 3
  • +2
13 Comments
 
LVL 37

Expert Comment

by:meverest
ID: 2615411
can you verify that the url appears correctly in the browser location field and that the meta tag is properly wrapped in cfoutput?

cheers.
0
 

Author Comment

by:nido
ID: 2615570
If I put <cfoutput> tags round the meta refresh I get the following error:

An error occurred while evaluating the expression: #url.Router#

What do you mean by 'browser location field'?
0
 
LVL 1

Expert Comment

by:bigbadb
ID: 2615683
so when you refresh the page the first time you should use form.router not url.router  It may be easy to just drop the prefix that way you can just set router = #router# on the refresh.  Try this
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 

Expert Comment

by:samphi
ID: 2615797
Hi,

If your uses type "POST" change your URL for FORM, for the variable ROUTER.

But if "GET" uses URL.

Yes, bigbadb "just set router = #router#" works.

Attention, don't uses spaces on your variables. (replaces by %20)

Hope that help.

0
 
LVL 1

Expert Comment

by:bigbadb
ID: 2616233
samhi

Thanks for basically restating my comment as an answer

0
 

Author Comment

by:nido
ID: 2616248
I have tried dropping the url and passing #Router# as well as using #form.router# but neither work. Any idea why it won't accept the <cfoutput> tags?
0
 
LVL 1

Expert Comment

by:bigbadb
ID: 2616387
it works with the cfoutput tags or not
0
 

Author Comment

by:nido
ID: 2616427
I'm still getting a blank page when dropping the url:

<meta http-equiv="Refresh" content="240;url=http://server/frame_sets/Customers.cfm?Router=#Router#&TimeSpan=#TimeSpan#">
0
 
LVL 5

Expert Comment

by:nathans
ID: 2617179
What are you trying to this for exactly?
0
 
LVL 37

Expert Comment

by:meverest
ID: 2617575
>If I put <cfoutput> tags round the meta refresh I get the following error:

that implies that you are not passing the right variables.  although using just #router# should work, try the following explicit assignment:

<cfif isdefined('url.router')>
<meta http-equiv="Refresh" content="240;url=http://server/frame_sets/Customers.cfm?Router=#url.Router#&TimeSpan=#url.TimeSpan#">
<cfelse>
<meta http-equiv="Refresh" content="240;url=http://server/frame_sets/Customers.cfm?Router=#form.Router#&TimeSpan=#form.TimeSpan#">
</cfif>

>What do you mean by 'browser location field'?

i refer to the box where you type the url into the browser - on netscape it is called 'location' on ie it is called 'address'

cheers.





0
 
LVL 37

Accepted Solution

by:
meverest earned 75 total points
ID: 2617579
oh, i should have also said to wrap it all in cfoutput...

<cfoutput>
<cfif isdefined('url.router')>
<meta http-equiv="Refresh" content="240;url=http://server/frame_sets/Customers.cfm?Router=#url.Router#&TimeSpan=#url.TimeSpan#">
<cfelse>
<meta http-equiv="Refresh" content="240;url=http://server/frame_sets/Customers.cfm?Router=#form.Router#&TimeSpan=#form.TimeSpan#">
</cfif>
</cfoutput>

cheers.
0
 

Author Comment

by:nido
ID: 2619007
meverest

I've tried your code but still get a blank page when it refreshes, it doesn't produce an error on the <cfoutput> tags though. The fields are correctly passed to the browser location field.
0
 

Author Comment

by:nido
ID: 2619127
I was forgetting to apply this code to both pages in the frame so it now works, thanks!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question