0

I am using window.open to launch a link from within an iFrame. Here is my code to launch the link:

=iif(Fields!budgetid.Value>1,"javascript:void(window.open('"+"http://test/forms/Su....aspx?BudgetId=" & Fields!budgetid.Value & "'))","")

The link is showing up in my iFrame, but when I click the link nothing happens. If I right click, copy the shortcut, and paste into another browser tab the link does work.

The link is actually on a SSRS report rendered within that iFrame. When I run the report outside of the iFrame, the link works fine. Is there something Javascript related that I can do to make the link work from within the iFrame?

Thanks,
jamey8420

3
Contributors
4
Replies
19
Views
4 Years
Discussion Span
Last Post by ryantroop
0

I think the IFRAME is technically "outside" the control of the window (for security reasons).

You can try removing the http: and instead do:

window.open("//test/forms/.....");

this way, you are not "leaving" the server to come back to the server, thus creating a security hole. If the double whack doesn't work, try just making a relative path from the IFrame src.

Alternatively, you can try to make the iframe src a relative path instead of http(s) so it is not "leaving" the server. Personally, I think this is probably your issue more than the former...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.