Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8512999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:26:02+00:00 2026-06-11T04:26:02+00:00

I have a function which retrieves a base64 encoded image from a controller and

  • 0

I have a function which retrieves a base64 encoded image from a controller and displays the image in a new window. It is working perfectly in Chrome, but fails in Firefox with the errors ‘not well-formed’ and ‘Request method ‘GET’ not supported’. I don’t understand why this would be the case given that I am using post, not get…

The relevant code section is:

function showPicture(label) {
$.post( 'picture-view', { labelname: label }, function(ImageSrc) {
   var img = new Image;
       img.src = "data:image/png;base64," + ImageSrc;
       img.style.position = 'fixed';
       img.style.left = '0';
       img.style.top = '0';
       img.onload = function() {        
       var newWindow = window.open("", label,"scrollbars=0, toolbar=0, width="+myImage.width+", height="+myImage.height);
                            creativeWindow.document.documentElement.innerHTML='';
                            creativeWindow.document.documentElement.appendChild(img);
      }​
});}

Edit Also, any recommendations for accessible books or websites to learn more about this material would be gratefully received.

Edit #2 I should also add that when I tried writing img.src to the console it came out as [objectXMLDocument].

Edit #3 I have tracked the error down to the fact that the ImageSrc being returned should be a String but is being interpreted as an XML object. The fact that it contains back slashes is causing the ‘not well-formed’ error. My question is now: how do I get $.post or $.ajax to return a String in Firefox (they already do so in Chrome).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T04:26:04+00:00Added an answer on June 11, 2026 at 4:26 am

    In the interest of not leaving an unanswered question…

    I ended up using a lightbox to display the image rather than generating a new window.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery AJAX function which retrieves some HTML markup and displays it
On my site I have a jquery function which retrieves data from another (secured)
i have a function which retrieves values from a webservice , then loops through
Suppose I have the following function, which retrieves data from a server in the
I have a class which has a function to retrieve children elements from a
Below I have a Json function and some php code which it retrieves. JavaScript
I have the following Django Model which retrieves 3 records from a database. The
I have a GridView which retrieves data from a database. Users have roles, some
Basically i have php code which retrieves data from a database into a table,
I am currently working on a php/javascript project which retrieves information from a database

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.