Shadowbox as popUp with AJAX (MooTools)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Shadowbox as popUp with AJAX (MooTools)

bonndan
//This is a handy script I often use (haven't tried many browsers though):


function container(url) {
   
//open big shadowbox
   Shadowbox.init();
   Shadowbox.open(
          {
                 content: '',
                 player: 'html',
                 width: (document.body.clientWidth || innerWidth) / 1.2,
                 height: (document.body.clientHeight || innerHeight) / 1.2,
          },
          {
                 enableKeys:false
          }
   );

//request and update the inner div with delay
   (function(){new Request.HTML({update: $('shadowbox_content'), evalScripts:true}).get(url);}).delay(4000);
   return true;
}