Solved

ColdFusion equivalent of window.top.location

Posted on 2000-05-03
10
204 Views
Last Modified: 2013-12-24
Hi,

I'm trying to get the URL of a framed page from within one of the pages inside my page, thetop navigator. However, when trying to use CGI variables such as #CGI.Path_Info#, the value returned is the path of the top navigator, not the framed page. The Javascript property window.top.location returns the correct value. However, is there any way to get the equivalent value using ColdFusion so I can get the value at the server-level?

Thanks for your help with this pressing need.

Dave
0
Comment
Question by:SenorDhuff
  • 5
  • 2
  • 2
  • +1
10 Comments
 
LVL 5

Expert Comment

by:nathans
ID: 2775182
I will continue looking but there is no way to get the frame location....

Nathan Stanford
Mr. ColdFusion
www.nsnd.com
ColdFusion Tips Plus
0
 
LVL 9

Expert Comment

by:Dain_Anderson
ID: 2830989
To get the top location (the page that created the frameset), you use CGI.PATH_INFO. To get the the current frame location, you use CGI.HTTP_REFERER, which will return the sub page. At all times, the CGI.PATH_INFO will return the top-most template.

Hope that helps
0
 
LVL 5

Expert Comment

by:nathans
ID: 2831485
This again is not a ColdFusion Solution!!
0
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.

 
LVL 9

Expert Comment

by:Dain_Anderson
ID: 2831497
You're right, it's not -- there isn't a ColdFusion solution to access JavaScript's CLIENT-side document object model.
0
 
LVL 5

Expert Comment

by:nathans
ID: 2831510
Sorry, I hope I did not offend you I just thought SenorDhuff wanted a ColdFusion Solution...

Well the correct answer is

Nope, you can't do that.


I like your suggestion on getting the information tho.

Nathan
ColdFusion Tips Plus free weekly e-ZINE
www.nsnd.com
0
 

Expert Comment

by:nrclar
ID: 2850302
Hmm, I believe there is a way to get the frames location....no matter where you are.


0
 
LVL 5

Expert Comment

by:nathans
ID: 2851302
But not a COLDFUSION way ....

There is a JavaScript way YES but not a ColdFusion way SenorDhuff was hoping ColdFusion had created a CF way to get it.

 Sorry, nope CF did not need to do that since you can get it another way.
0
 

Expert Comment

by:nrclar
ID: 2852074
Nathans, Ok..as a teaser .... explain, your reasoning behind the fact CF cannot resolve a frame location by CF alone? [using a **certain** methodology.........]

?

N

0
 

Expert Comment

by:duderstadt
ID: 2893267
While there is no direct way to access the equivalent value of window.top.location in CFML (there isn't one), a quick and easy work-around is available...

In your frameset code, you can add the following hack:

<cfoutput>
<!-- framset... -->
<frame name="myFrame" src="myPage.cfm?topLocation=#CGI.SCRIPT_NAME#">
<!-- more header code -->
</cfoutput>

Or anything similar (forms, etc.)

This might be an ugly hack... but the user will never see it unless they open one of your frames in a new window. (And there are several ways to stop that evil act).

Jim
0
 
LVL 5

Accepted Solution

by:
nathans earned 150 total points
ID: 3527273
Your Question:

I'm trying to get the URL of a framed page from within one of the pages inside my page, thetop navigator. However, when trying to use CGI variables such as #CGI.Path_Info#, the value returned is the path of the top navigator, not the framed page.

The Javascript property window.top.location returns the correct value.

> Yes, JavaScript can do this.


However, is there any way to get the equivalent value using ColdFusion so I can get the value at the server-level?

> The Answer is NO.  There is no way to get any equivalent value useing ColdFusion.

=======================================
Teaser there is NO CF Variable, or even for that matter no CGI Variable that will tell us where the Page Location inside a Frame is.
=======================================

If someone can prove me wrong using HTML, and ColdFusion ONLY.  Then I will give them 100 Points of my own with a grade of an 'A'

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…

789 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