ThickBox and pictures that are handled dynamically via server side code
After initial swfObject madness , I really started to like jQuery. Cody Lindley wrote ultimate hybrid modal window plugin called ThickBox. Today, however, I encountered little problem with ThickBox. ThickBox checks a href tag for class called thickbox. If that classname is found, script checks for href filename extension and if it is one of known image formats, it shows picture as a picture. If not, it shows content as a plain text.
I wanted to use it on a pictures that are handled dynamically via server side code. I inserted simple param check, to be able to force file extension.
[ftf]
var queryString = url.replace(/^[^\?]+\??/,”);
var params = tb_parseQuery( queryString );
if (params[‘forceExtension’] != ”) {
urlType = params[‘forceExtension’];
}