[Phpwm] displaying images on screen

Tim Williams T.M.Williams at cs.bham.ac.uk
Thu Oct 2 14:33:43 UTC 2008


On Thu, 2 Oct 2008, alan dunn wrote:

> Thanks so far - I didn't get all the question correct! We agree about
> how to put the image to the page. The problem (I now understand) is that
> we want to show it as a pop-up within an existing page, so the header
> line is already set: content="text/html; "
>
> What this does is cause the image to display as text.

That's what I would expect to happen, the content line is what tells the 
browser what type of data is being sent, so if you send text/html that is 
how it will be treated if the browser is correctly following web 
standards. It's the web equivalent of a file extension.

If you want a popup window, then you will need to add some javascript code 
to the page that opens a popup window, with the supplied URL being the php 
script that generates the image, or another page that has that URL 
embedded in it.

However, given how common popup blockers are this isn't a design which I 
would reccomend.

Tim W

-- 
Tim Williams BSc MSc MBCS - Euromotor Autotrain
Web : http://www.autotrain.org
Tel : +44 (0)121 414 2214 (ext 42214 on internal phone)



More information about the Phpwm mailing list