[thelist] Feeding image bytes from PHP to client-side JavaScript

Warden, Matt mwarden at mattwarden.com
Thu Dec 7 17:48:38 CST 2000


thelist,

Is it possible to grab an image off the filesystem with php and feed it back
to a imageObject.src attribute? Here's the situation:

I need to call a PHP script from the client side and that script will
determine which image to return:

var myimg = new Image();
myimg.src = "scripts/myscript.php";

Then, I will replace that returned image with an "placeholder" image already
on the page... sort of like a rollover.

Basically, does JavaScript support this kind of thing? Are there issues I need
to be aware of? Does PHP have adequete binary support?

Thanks!

--
mattwarden
mattwarden.com





More information about the thelist mailing list