Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ColdFusion equivalent of window.top.location

Posted on 2000-05-03
10
Medium Priority
?
215 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
Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

 
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 450 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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
The purpose of this video is to demonstrate how to Import and export files in WordPress. 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 : Click on Too…
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…
Suggested Courses

610 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