• May 11, 2007

    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.

    
            var queryString = url.replace(/^[^\?]+\??/,'');
            var params = tb_parseQuery( queryString );
            if (params['forceExtension'] != '') { 
                urlType = params['forceExtension'];
            }
    
    
    
    
    
    
    

No comments yet.

Have your say:

 
This blog is Gravatar friendly. Don't have Gravatar? Get one fast!
 

Proudly running on Word Press, and above all, proudly using Comic Sans.

Nivas.hr © Copyright 2009    All right reserved    Made in Croatia Yeah, we made our own site!Nivas.hr