Solved

ColdFusion equivalent of window.top.location

Posted on 2000-05-03
10
208 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
[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
  • 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
Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

 
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

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
IPA - can it be run on a web server? 3 247
Summernote required 3 284
Link failure 16 89
SSL on Apache 2... config file 1 28
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…
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…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…

737 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