The ajax call need handle the server errors like: 4xx and 5xx.
Usualy the 404, 403 errors return blank content and doesn't display corect content like:

The requested page could not be found.
You are not authorized to access this page.

For html content could be used:

$('#TB_ajaxContent').load(url += '&random=' + (new Date().getTime()),function(response, status, xhr) { //to do a post change this load method
if(status == 'error'){
$('#TB_ajaxContent').html(response);
}

in thickbox.js

Comments

nicolicioiu.liviu’s picture

Assigned: nicolicioiu.liviu » Unassigned
frjo’s picture

Category: bug » feature
Status: Active » Closed (won't fix)

Please test the new Colorbox module and see it that works better.

http://drupal.org/project/colorbox

I have ported all Thickbox features to Colorbox so it should work as a drop in replacement.

When Colorbox has a stable release I will start actively recommend people to switch/upgrade from Thickbox to Colorbox. I'm the maintainer of Thickbox and a co-maintainer of Colorbox.