I have a Script which generates a PDF and i get the "File Download"-Dialog when i click it:
<a href="/exec/hotels/getdesc.php?id=22">PDF-Preview</a>
This works ok, but i would like to use a <b:button>-Instead of the anchor-Tag because the link looks crappy compared to the buttons ;-)
But a button with an click-Event and a bb.command.load doesn't work because the getdesc.pdf doesn't return a xml but a pdf file. So how can i get the button to work like a normal link?
greetings
Matthias
[edit] I just found it out myself, its really easy:
<b:button>test
<e:handler event="click" type="text/javascript">
window.open("/exec/hotels/getdesc.php?id={$hotel.id}");
</e:handler>
</b:button>
<e:handler event="click" type="text/javascript">
window.open("/exec/hotels/getdesc.php?id={$hotel.id}");
</e:handler>
</b:button>
But its not ideal that a new Browser-Window is opened. (Firefox closes it instantly, but in IE it stays open)

PDF Download
14 April, 2008 - 17:28 — andysHi Zappel,
What is exactly your problem? The pdf is unable to be loaded if you use button instead of anchor, right?
I have tested both in b:button and anchor, but the pdf is able to be loaded using both cases (b:button and also anchor).
Is it possible there is problem in your php file?
Andys