Forum Moderators: open

Message Too Old, No Replies

Question about <Img src="HUH"?>

         

SethCall

7:11 pm on Oct 3, 2002 (gmt 0)

10+ Year Member



Ok to forum moderators: this involves PHP, but I dont think this is the crux of this question. I will try there though if no one knows here, OR you may just force it over there anyway.

Here is my question. Is there any way, other than an image tag, that you can display an image?

This is all new to me, but for instance: you can do,
<img src="view.php">
and the php file actually just parses the binary data out of the file and shoots it up to the browser.. (along with a header that says, "Content-type: image/png"

Well anyway! Im just curious, do browsers only show images if there is a img tag first? Or is the image tag unnecessary? Or, can you use an image tag, and not fill in the source field, and somehow "dump" the data into the tag, "somehow"

Ok this is a crazy question I know but I just need to know :) lol

SethCall

7:15 pm on Oct 3, 2002 (gmt 0)

10+ Year Member



Well, I tried to just "dump" the header and binary data out to the browser without a <img> tag. Broken link in IE, and Mozilla says, "bad info for this type of image".

So .. right now I guess I am just asking, do img tags need a src?

tedster

7:25 pm on Oct 3, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you considered using the <object> tag for your situation?

W3C Reference [w3.org]

nafmo

7:35 pm on Oct 3, 2002 (gmt 0)

10+ Year Member



You could use a data: URL and dump the data inline, but that only works with Mozilla AFAIK. See RFC 2397.

SethCall

7:36 pm on Oct 3, 2002 (gmt 0)

10+ Year Member



Woohoo! Thanks TED! BIG TED COMES THROUGH AS ALWAYS!

BIG TED YEAH!

<OBJECT id="clock1"
classid="clsid:663C8FEF-1EF9-11CF-A3DB-080036F12502"
data="data:application/x-oleobject;base64, ...base64 data...">
A clock.
</OBJECT>

Look at that! that data field is EXACTLY what i need ;) YES!
Ted = ManBeast;

My ultimate compliment. THX !

SethCall

7:45 pm on Oct 3, 2002 (gmt 0)

10+ Year Member



nafmo! does this data business work for object, though? in IE?

Gosh i love mozilla :)

IE = bunch of n00bs ;)

rcjordan

7:49 pm on Oct 3, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>Woohoo! Thanks TED! BIG TED COMES THROUGH AS ALWAYS! BIG TED YEAH! Ted = ManBeast

Heh! I'm told that the Tedster may be available for autographs at pubcon2.

SethCall

7:55 pm on Oct 3, 2002 (gmt 0)

10+ Year Member



Whoa! where is this pubcon2!

BUt PFFFF ! U think i would go just For TED?

come on. j/k TED! Your cool man!

tedster

7:57 pm on Oct 3, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Autographs? Shoot, I may be available to collect consulting fees :)

Seriously, though, using the <object> tag for images is an often overlooked possibility. But the trend of recent W3C recommendations looks like the <img> tag may eventually be deprecated.

One tag for all included media - images, applets, video, audio, hologram, smell-o-vision, telepathic contruct etc.

nafmo

7:59 pm on Oct 3, 2002 (gmt 0)

10+ Year Member



Well, I've actually never tested using data URLs, since my favourite browser (hint: look at my user profile) doesn't support them. And I have yet to find an actual web page that uses them, since only Mozilla support them...

But it is the answer to the actual question posted... :-)

tedster

8:03 pm on Oct 3, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Whoa! where is this pubcon2!

London, Saturday October 12 [webmasterworld.com]. It's going to be quite a party!

SethCall

8:06 pm on Oct 3, 2002 (gmt 0)

10+ Year Member



lol oh london ;)

dang. There is a "ocean" in between me and London :(

I visited there this last summer though...
Hey you know those famous guards at the palace? And the event known as the "changing of the guards"?

Those guards dont look as "cute" when you realize that they are holding machine guns. If one were to snap, he could seriously kill the whole crowd. This bothered me ;)