Current location: Hot Scripts Forums » General Web Coding » JavaScript » Parent window URL from Iframe


Parent window URL from Iframe

Reply
  #1 (permalink)  
Old 01-04-08, 10:56 PM
scotty69 scotty69 is offline
New Member
 
Join Date: Jan 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Parent window URL from Iframe

Hi all,

I'm new and I'm trying to protect a page I created.

I have a page that is opened in an Iframe. I want to test the parent pages URL to make sure it's the right site using my script and I want to read some of the URL to use on my page.

I have been playing with veriances of the following lines of code:

strRefer = top.location.hash
or
strRefer = parent.Request.ServerVariables("HTTP_REFERER")


Thanks for any help.

Scotty.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 01-04-08, 11:58 PM
nova912's Avatar
nova912 nova912 is offline
Code Guru
 
Join Date: Sep 2004
Location: Traverse City, MI, USA
Posts: 821
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
I'm new and I'm trying to protect a page I created.
From that line right there I can already tell you that can not find a solution to your problem via JavaScript. If you would like to implement the type of security you desire you will need to use a Server Side Language such as PHP to determine if the page is being access via another site, and in-turn decide what the user sees.
__________________
"BTW, I can't program at all the only thing I figured out is how to upload templates to my server."
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Open url in same window camman JavaScript 2 01-24-07 08:49 PM
linking to both iframe content and parent page vman2957 HTML/XHTML/XML 5 12-02-06 01:49 AM
Iframe javascripts on parent frame (main frame) riquelme JavaScript 1 03-16-06 01:37 PM
Loading a new page in place a parent from an iframe Highly-Annoyed HTML/XHTML/XML 3 07-18-05 12:05 PM
iframe linking not working under url masking willNoClue HTML/XHTML/XML 1 08-02-04 11:34 AM


All times are GMT -5. The time now is 07:16 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.