I am using javascript:void(window.open('http://server1/test/...ate.php?matter="&Fields!matter.Value + "', '_blank', 'fullscreen=yes, scrollbars=auto'));"

to launch a report from a SSRS 2008 report that is being viewed within an iFrame. This is done in the Jump to URL.

<iframe name='myIframe' id='myIframe' src='http://sqlreports/Re...t=my_htmlviewer' scrolling='auto' frameborder='0' width='100%' onload='resize_iframe()' ></iframe>

the resize_iframe() function just makes the iFrame full screen to whatever the window is made.

Before adding the @rc:LinkTarget=_blank to the iFrame, the links did not work. Now, when I click on the link to launch the PHP page I get two windows that open.

One opens and renders the page properly: http://server1/test/...p?matter=123456
while the other window opens with the "Internet Explorer cannot display the webpage" error with the following URL: javascript:void(window.open('http://server1/test/...llbars=auto'));

I'm not quite sure what is causing these two windows to open up. When I remove the @rc:LinkTarget=_blank from the iFrame, the links go back to not working. I've also tried to remove the _blank for the Jump to URL.

Any ideas/assistance would be greatly appreciated.

Thanks,
Jamey8420

Recommended Answers

All 2 Replies

Im not sure I totally followed you, but Im assuming you are wrapping this all with an anchor tag, and using the href as "javascript:void...."

If that is the case, anchors with an href will always try to navigate to a page with the url given. So, you basically are saying "open the javascript link to a blank page" and then the javascript says "open a new page with this url"

The correct way to do this is to change the anchor tag to a div and make the onlick as follows:

<div class="mimicAnchorClass" onclick="window.open(http://url.com,'pageName','myoptions');">
Click me
</div>

alternatively, if you insist on anchor tags, you can simply make the href="#" or even "", and add the onclick to the anchor tag.

I would encourage you to not use the anchor as you will just be fighting with the browser.

Hope that helps!

Good luck,

Ryan

Ryan,
Thanks for the idea. It wasn't the solution I needed, but got me thinking.

I was able to come up with a solution. In the Jump to URL in the SSRS 2008 report, I changed this: javascript:void(window.open('http://server1/test/...ate.php?matter="&Fields!matter.Value + "', '_blank', 'fullscreen=yes, scrollbars=auto'));"

to this:

=”http://server1/test/test_update.php?matter="&Fields!matter.Value

Thanks for all that checked this question out.

jamey8420

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.