views:

330

answers:

3

I have jQuery thickbox(TB_iframe=true) which shows an https page in an iframe based overlay.

the parent page is http & overlay page is https. if i use

self.parent.tb_remove() 

This does not work and gives me

Permission denied for <https://www.abc.com&gt; to get property Window.tb_remove from <http://www.abc.com&gt;.

Any solution. I want to be able to close the thikbox irrespective to whether its is https or http page that it is displaying in an iframe.

A: 

use a relational url like ../page.html instead of http://domain.com/page.htm as your link. check that the page opening the thickbox lightframe is in the same domain as the page being displayed in the light frame.

i wrote a javascript function to create and open a light frame similar to thickbox, maybe it will help jLightFrame

Daniel Brink
A: 

As Daniel said, you should use a relative url. The reason it fails is because you you must only read javascript content at the same "trust" (ssl) level that you are currently on.

You wouldn't want your bank's HTTPS site doing an ajax query to a non-https web service would you?

Nate Bross
A: 

Sourabh - did you ever find a solution for this. i am pretty sure the two posted answers are incorrect. im having the same issue, https modals jquery cant talk back to a http page.

daniel and nate, if the calling page is http how would using a relative path for the modal window load an ssl window? i would have thought that will load up the iframe under the same protocol / domain as the parent is calling from.

also i know this post is two months old, im just desperate for an answer!

AaronS
I could not fix this problem.Fortunately, as per the requirements I was allowed to redirect to a page which reloads parent page
Sourabh