Solved

Problem with page refresh

Posted on 2000-03-14
13
164 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Suggested Courses

739 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