Monday, March 19, 2012

Open New Window from Iframe

I am having this problem. Any thoughts?
the standard way of opening a new window using the Jump To URL
navigation feature - ie using the
="javascript:void(window.open('someURL'))" works great as long as the
report containing these links is NOT in an IFRAME. If it is, it's
treating the Javascript as the URL.
Anyone getting same results? Anyone know of a workaround?This is one I use. But, this opens it up in a new window.
="javascript:void(window.open('" & Globals!ReportServerUrl &
"?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
"&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"
I worked with someone about a week ago who wanted to do what you do. This is
what I believed worked for him. Let's say your iframe is called main. Then
do this:
="javascript:void(window.open('" & Globals!ReportServerUrl &
"?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
"&rs:Format=CSV&rc:Encoding=ASCII','main'))"
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Raz" <Raz@.discussions.microsoft.com> wrote in message
news:184220F9-B42F-42B9-80F1-ED8946C29EB6@.microsoft.com...
>I am having this problem. Any thoughts?
> the standard way of opening a new window using the Jump To URL
> navigation feature - ie using the
> ="javascript:void(window.open('someURL'))" works great as long as the
> report containing these links is NOT in an IFRAME. If it is, it's
> treating the Javascript as the URL.
> Anyone getting same results? Anyone know of a workaround?
>|||Thanks for the Reply Bruce. I have read many of your posts and have already
tried opening a window using your technique. Actually the technique works
fine except for when you are opening a window from an Iframe the address bar
in the new window shows
"javascript:void(window.open('http://www.google.com','_blank'))" instead of
the url "http://www.google.com" of course the result of this is "Page cannot
be displayed"
Any thoughts?
"Bruce L-C [MVP]" wrote:
> This is one I use. But, this opens it up in a new window.
> ="javascript:void(window.open('" & Globals!ReportServerUrl &
> "?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
> "&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"
> I worked with someone about a week ago who wanted to do what you do. This is
> what I believed worked for him. Let's say your iframe is called main. Then
> do this:
> ="javascript:void(window.open('" & Globals!ReportServerUrl &
> "?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
> "&rs:Format=CSV&rc:Encoding=ASCII','main'))"
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "Raz" <Raz@.discussions.microsoft.com> wrote in message
> news:184220F9-B42F-42B9-80F1-ED8946C29EB6@.microsoft.com...
> >I am having this problem. Any thoughts?
> >
> > the standard way of opening a new window using the Jump To URL
> > navigation feature - ie using the
> > ="javascript:void(window.open('someURL'))" works great as long as the
> > report containing these links is NOT in an IFRAME. If it is, it's
> > treating the Javascript as the URL.
> >
> > Anyone getting same results? Anyone know of a workaround?
> >
>
>|||Just to let everyone know I go this working by including &rc:linktarget=_self
in the url to the report server.
"Raz" wrote:
> Thanks for the Reply Bruce. I have read many of your posts and have already
> tried opening a window using your technique. Actually the technique works
> fine except for when you are opening a window from an Iframe the address bar
> in the new window shows
> "javascript:void(window.open('http://www.google.com','_blank'))" instead of
> the url "http://www.google.com" of course the result of this is "Page cannot
> be displayed"
> Any thoughts?
> "Bruce L-C [MVP]" wrote:
> > This is one I use. But, this opens it up in a new window.
> >
> > ="javascript:void(window.open('" & Globals!ReportServerUrl &
> > "?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
> > "&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"
> >
> > I worked with someone about a week ago who wanted to do what you do. This is
> > what I believed worked for him. Let's say your iframe is called main. Then
> > do this:
> >
> > ="javascript:void(window.open('" & Globals!ReportServerUrl &
> > "?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
> > "&rs:Format=CSV&rc:Encoding=ASCII','main'))"
> >
> >
> > --
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
> >
> >
> > "Raz" <Raz@.discussions.microsoft.com> wrote in message
> > news:184220F9-B42F-42B9-80F1-ED8946C29EB6@.microsoft.com...
> > >I am having this problem. Any thoughts?
> > >
> > > the standard way of opening a new window using the Jump To URL
> > > navigation feature - ie using the
> > > ="javascript:void(window.open('someURL'))" works great as long as the
> > > report containing these links is NOT in an IFRAME. If it is, it's
> > > treating the Javascript as the URL.
> > >
> > > Anyone getting same results? Anyone know of a workaround?
> > >
> >
> >
> >

No comments:

Post a Comment