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

x
?
Solved

HOW TO GET PARENT FRAME NAME

Posted on 2002-05-15
6
Medium Priority
?
614 Views
Last Modified: 2008-02-01
Hi, In VBSCRIPT

I have an ASP page that is in a frame within a HTM page, how can i reference the name of the main page from with in this ASP page.  I need to know which site is accessin the asp, i cant use the REFERE command becuase this page if access from a previous child frame, and I need to know the name of the main HTM parent.

Any help much appriciated

Regadrs

Craig
0
Comment
Question by:publicityhouse
[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
6 Comments
 
LVL 3

Expert Comment

by:hagur
ID: 7010726
ASP is a server side language and it will never be able to get the name of the frame from the client.

You should be able to use:
Request.ServerVariables("SCRIPT_NAME")

or maybe:
Request.ServerVariables("HOST_NAME")
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 7010737
Using clientside scripting you cannot do crossdomain calls. With other words, you cannot find out the websit eon the clientsite. However, on the serverside you can get the referrer, but ONLY if they used a plain HREF link (no javascript or vbscript to change the page).

I believe the following should work
<%=Request.ServerVariables("HTTP_REFERRER")%>
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 7010739
HOST_NAME returns the name of the machine making the request. That is, the client.

SCRIPT_NAME returns the relative location of the current ASP page.

CJ
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 29

Accepted Solution

by:
Göran Andersson earned 600 total points
ID: 7011735
There is no frames in ASP. The information about the frames lies entirely on the client side.

There is no site that accesses the ASP pages, it's the client that accesses the pages. It only happens to be inside a frameset that comes from another server.

In JScript, you can use top.location.href to get the address of the main frameset source. But if that's not on the same server, you get a permission denied error.

You have to pick up the referer information where it's available (on the previous page) and send it on to the page where you need the information.
0
 

Author Comment

by:publicityhouse
ID: 7013215
oh dear, I may have to re-think how the site functions.  Many thanks to all that commented.
Craig
0
 
LVL 29

Expert Comment

by:Göran Andersson
ID: 7013277
B?

Should I consider to stop answering questions where there is no definitive answer?
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

604 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