You can't do that. As it is a modal popup, it will always open inside the IFrame.
You can open an window using
window.open()
, so that it will open over the current browser window. But that will not help you I guess.
So, you have do something like below.
-> Open this image from parent window not IFrame.
-> For that you can call the function of parent like
window.parent.MyFunction(dataToSend);
Here
MyFunction
is defined inside parent window.
And
dataToSend
is the data you want to send to parent.
-> Now according to the data, just invoke this modal popup image inside that
MyFunction
.
Can you implement this ? Give it a try.
Feel free to ask any doubts. We will discuss.
[Update]
For Permission denied issue
This issue comes, when the IFrame and the Parent form are in different domain.
We can also fix this.
I have written one tip for this.
You can refer -
Communication with Cross Domain IFrame - A Cross Browser Solution[
^].
Please try this and let me know.