Open in new Window

in my Webapp when the user clicks onto a button then a link to a pdf-file is opened in a new browser window. In the action event of the button I put:


Everythings works fine (the pdf-file is displayed) with Safari and Firefox after allowing popups in the browser.
When testing with Internet Explorer on Windows 8 then after allowing popups I get a page not found error. Additionally there is some cryptical text added at the end of the URL in the address bar so the „http://abc/myapp.cgi“ becomes „http://abc/myapp.cgi/A430…“

What am I doing wrong?

you can test the error here:

To test the error:

  • Push the „Einloggen“ button

  • Log in with:
    Benutzername: cm
    Passwort: dg2f6j

  • A new button appears on the page with the caption: „Bitte hier klicken für die Anleitung“

  • Push the button and see the pdf-file open in a new tab/window.

It could be that IE8 doesn’t have a plugin for viewing PDF files.

As far as the cryptic text, that’s actually the url of that particular web file.

Thanks Greg.
No, there is a working pdf-plugin in the browser.

We discovered something new:
The pdf-file loads correctly in Internet Explorer 8 when popup blocking is completely turned off.
But: When popup blocking is not completely turned off, and the popup warning appears and the user selects to always allow or to allow once the popup, then the pdf-file does not load.

Right. Pop up blockers do cause issues with that form of ShowURL.

Ok, so how do I avoid this problem?

You can present a link to the file with the new window option, instead of the button when you are in IE8. A WebStyle can make it look close to a button.

Hello Michael,
your hint seems to work. I took a WebLink and styled it so that it looks like a button. I will upload the new version of the webapp soon with the changes.

Just an additional detail. Put this in App.HTMLHeader or in a PageSource, it will suppress the text underline and make the text color black, so the link will really look like a button.

<style> a { text-decoration: none; color: black;} </style>

Thanks Michel,
the „button“ looks better now. It has a green background an the text ist white :wink: