Solved

Problem with page refresh

Posted on 2000-03-14
13
160 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
 

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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Suggested Solutions

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now