Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Occasional Ajax error, no status code, no response  RSS feed

Bund De
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using JSF 2.2 and Primefaces 5.1

I'm trying to take a "screenshot" of my website using html2canvas, then send it to my back-end to generate a PDF report so the user can download it. The problem is I will occasionally get an ajax error, on Firebug it shows an XHR with no status code, no response, 0 Bytes in size. The download STILL WORKS perfectly, but I get this annoying ajax error that gets picked up by my global ajaxStatus and I have to reload the page.

This is what it looks like on Firebug

This is how I'm doing it with html2canvas.

Onclick event calls a javascript function

The Function


clickPrintButton function

The hidden download button

Any clues? I've been stuck on this for weeks. Any help is appreciated.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!