[BNM] href target='_blank' open in a new window - is it a no-no
Jason Bailey
jasonslbailey at yahoo.co.uk
Thu Jan 10 11:37:16 GMT 2008
Thanks all. Had a bit of trouble with it working in
both IE and Firefox but the following seems to work
OK. Not sure but putting this.target seems to have
sorted it for both???
Had to reply as after I emailed I realised that
target='_blank' was deprecated. I now have something
like the following in the source:
<a
href="page.php?page=pga_document_display&doc_seq=123456"
onClick="window.open(this.href, this.target); return
false; " >filename.pdf</a>
It doesn't (select ... from doc_table where
doc_seq=123456) link to the pdf/doc direct as they're
stored in a database so there's a page in between
(pga_document_display) which basically gets the blob
and works out the file type and supplies the
appropriate header, followed by a print($content)
which basically pipes the pdf/doc to the browser
(where appropriate headers have been sent).
Yes, I like the idea of having both an "open in
existing" window and an "open in new window". Thanks
for that. The back button for the pdfs is effectively
broken but the original window containing useful non
pdf/doc applicant information (e.g. address) is still
there. The pdfs/docs have been supplied by the
applicants and are generally copies of degree
certificates, transcripts, references and the like so
I think they're acceptable here. This is a very crude
document management system. Well not quite.
Thanks very much.
Jason
__________________________________________________________
Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com
More information about the BNMlist
mailing list. Powered by Wessex Networks