06-16-2011 06:49 AM
Hi,
I'm trying to get an image data from the server(base64 encoded) and diaplay the image in my webpage using div. This works fine from the web browser. But when i compile it to a webworks application the image doesnot display at all. What am i missing? PFB the JavaScript code of how i set the image from the server.
var testObject = testHTTP.responseText.parseJSON();
var image = testObject.SearchImageResponse.images;
document.getElementById("test").innerHTML = "<img src='data:image/jpeg;base64,"+image+"' />";Please note: That this works fine in IE
Thanks in Advance....
Solved! Go to Solution.
06-17-2011 12:13 AM
06-17-2011 10:44 AM
This may be a problem in our URL whitelisting... I've seen this before, I'll ping our development and testing team to see if this is a known issue
06-17-2011 11:03 AM
Is your server IP authorized on your domain list (config.xml)?, if not add it (check subdomain access too just in case), this will fix it, if not try using jsonp instead. Remember that if the IP of your server doesn´t change then you can just whitelist it on your config, if it changes (ie. the user can change the IP from the app) then add "*", but this will ONLY work for public IPs.
06-17-2011 11:17 AM
06-17-2011 11:19 AM
Thanks!, you should mark your post as the solution.
06-17-2011 11:22 AM