470,561 Members | 1,915 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,561 developers. It's quick & easy.

check page loaded in an iframe

I load a page into an iframe that comes from another server. If this
page is not accessible, this server redirects to a login page.
I want to check if the correct page was loaded in the iframe in order to
give the appropriate instructions if the redirect occured. My idea was
to use framename.search('some text on the page'), but I'm not allowed to
do this for a page from a different server.
Any idea how to do something like this, or is this simply impossible?

Christian

Jul 20 '05 #1
2 6460
Christian Schmitt wrote:
I load a page into an iframe that comes from another server.
I hope you are allowed to use the content of the third party.
If this page is not accessible, this server redirects to a login page.
I want to check if the correct page was loaded in the iframe in order to
give the appropriate instructions if the redirect occured. [...]
Any idea how to do something like this, or is this simply impossible?


You need a signed script, otherwise the Same Origin Policy gets you.
Ask friend(!) Google for details.
PointedEars
--
news:de.comp.lang.javascript
Jul 20 '05 #2
Thomas 'PointedEars' Lahn schrieb:

Christian Schmitt wrote:
I load a page into an iframe that comes from another server.
I hope you are allowed to use the content of the third party.


Sure I am.
If this page is not accessible, this server redirects to a login page.
I want to check if the correct page was loaded in the iframe in order to
give the appropriate instructions if the redirect occured. [...]
Any idea how to do something like this, or is this simply impossible?


You need a signed script, otherwise the Same Origin Policy gets you.
Ask friend(!) Google for details.


But signed scripts don't work with IE, right? I browsers of the
netscape-family, I can use the UniversalBrowserRead privilege even
without signed scripts, the user just has to confirm the warning dialog.
But what do I do in IE? Asking the user to add my page to the trusted
sites isn't really an option. At least I wouldn't do this as it gives
the site just too much power. Isn't there any equivalent to
UniversalBrowserRead in IE?
I didn't find anything in google, that's always my first stop.

PointedEars
--
news:de.comp.lang.javascript

Thanks, Christian
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Pete Wason | last post: by
6 posts views Thread by adnanx82 | last post: by
2 posts views Thread by DaveO | last post: by
14 posts views Thread by Silver | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.