473,395 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Iframes and getting their current URL within Subdomain

Hey all,

Quick question. My website is :

http://mywebsite:1234

and I load into an IFRAME this url :

http://anotherwebsite:2828

As you might have noticed they are both on the same domain (just not
fully qualified (ie. http://mywebsite.dmianname.com:1234)).

How do i access the URL of the IFRAME? I keep getting access denied.
I know I can't read the url of an IFRAME if the domains are
different... but in this case aren't they the same?

Thanks for any advice you can give.

Ryan Ritten
Jul 2 '08 #1
2 2085
RyanRitten wrote:
http://mywebsite:1234

and I load into an IFRAME this url :

http://anotherwebsite:2828

As you might have noticed they are both on the same domain (just not
fully qualified (ie. http://mywebsite.dmianname.com:1234)).

How do i access the URL of the IFRAME? I keep getting access denied.
I know I can't read the url of an IFRAME if the domains are
different... but in this case aren't they the same?
The SOP does not consider DNS resolution. You have to use FQDNs instead,
and set document.domain appropriately. Alternatively, you may use
server-side URL rewrite so that it appears to the client that both resources
are from the same domain.
HTH

PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Jul 3 '08 #2
On Jul 3, 1:33*am, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:
RyanRitten wrote:
http://mywebsite:1234
and I load into an IFRAME this url :
http://anotherwebsite:2828
As you might have noticed they are both on the same domain (just not
fully qualified (ie.http://mywebsite.dmianname.com:1234)).
How do i access the URL of the IFRAME? *I keep getting access denied.
I know I can't read the url of an IFRAME if the domains are
different... but in this case aren't they the same?

The SOP does not consider DNS resolution. *You have to use FQDNs instead,
and set document.domain appropriately. *Alternatively, you may use
server-side URL rewrite so that it appears to the client that both resources
are from the same domain.

HTH

PointedEars
--
* * realism: * *HTML 4.01 Strict
* * evangelism: XHTML 1.0 Strict
* * madness: * *XHTML 1.1 as application/xhtml+xml
* * * * * * * * * * * * * * * * * * * * * * * * * * -- Bjoern Hoehrmann
Helps a bunch. thanks man :)
Jul 3 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: maxim vexler | last post by:
I'm reading a lot of talks lately about the term iFrame and with your permission would like to ask a few question about that : - what is iFrame, i mean what is it good for ? - does all the...
7
by: Scott | last post by:
Hello All, I've been reading all of the various issues with Iframes in netscape. I have tried all of the various fixes posted, and have even implemented both an iframe and ilayer. My problem is...
1
by: innov8iv | last post by:
One page, several iFrames. Each contains its own mini web page. Is it not possible to "go back" to a previous page within a particular iFrame? (While leaving the others in their current state.) ...
5
by: Frances | last post by:
I need to replace iframes acc. to what option user chooses in a sel obj.. but figured have to load a blank iframe when pg loads so I can replace it.. (iframe gets put in a pre-existing div..) this...
2
by: Guadala Harry | last post by:
1. Are IFrames supported only in uplevel versions of IE? If not IE exclusively, what browsers support IFrames? 2. Are IFrames going to be supported in the future - as far as anyone knows - or...
2
by: Jon | last post by:
All, I'm currently working with a PHP-based CMS application, and am begining to put the finishing touches on it via Javascript validation. Currently, I'm using fairly standard methods of...
14
by: Adnan Siddiqi | last post by:
Hi Suppose I have following URLs comming from an HTML document <a href="http://mydomain1.com">Domain1</a> <a...
8
by: Kenny Lai | last post by:
hey, Is there a way to communicate between iframes on different subdomains? e.g. from one.dot.com to two.dot.com? there is a security access restriction passing javascript commands between...
3
by: Brett R. Wesoloski | last post by:
I am having problems using HttpContext.Current.Request.Url.Host. I have some code that does this... if (HttpContext.Current != null) { subdomain = HttpContext.Current.Request.Url.Host; }
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.