What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Returning a numeric value and an image

Returning a numeric value and an image
Author: Message:
WDZ
Former Admin
*****

Avatar

Posts: 7106
Reputation: 107
– / Male / Flag
Joined: Mar 2002
RE: Returning a numeric value and an image
quote:
Originally posted by MeEtc
OK, so how can XMLHTTPRequest load an image...
Good question... I didn't think that through before posting. :$ I just thought using a header would be easier than wrapping everything in JSON like Matti suggested.

You might be able to do it using a data: URI...

Javascript code:
imageElement.src = "data:image/png;base64," + req.responseText;


That code would require the image data to be base64-encoded on the server side. It might work without encoding too, but you can test that yourself. :p
03-21-2009 09:23 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Returning a numeric value and an image - by MeEtc on 03-21-2009 at 05:43 PM
RE: Returning a numeric value and an image - by Matti on 03-21-2009 at 05:53 PM
RE: Returning a numeric value and an image - by MeEtc on 03-21-2009 at 06:02 PM
RE: Returning a numeric value and an image - by WDZ on 03-21-2009 at 08:24 PM
RE: Returning a numeric value and an image - by MeEtc on 03-21-2009 at 08:51 PM
RE: Returning a numeric value and an image - by WDZ on 03-21-2009 at 09:23 PM
RE: Returning a numeric value and an image - by MeEtc on 03-21-2009 at 09:36 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On