开发者

modal using prototype in rails

How to open an iframe modalbox in a rails app using the p开发者_运维知识库rototype javascript library?


http://livepipe.net/control/window is a prototype library has good support for iframes in modal windows and can be used with javascript something like this:

html:

<a href='http://example.com/iframe'>click me!</a>

javascript:

var modal = new Control.Modal($('modal'),{  
    overlayOpacity: 0.75,  
    className: 'modal',  
    fade: true,
    iframe: true  
});

Which will open the href of a link with the id of model in a lightbox


Not prototype, but I will use leigeber's TinyBox: http://www.leigeber.com/2009/05/javascript-popup-box/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜