hi,
not another link, as per the script, the popup closes when close
button is clicked. we changed a little, so tht when the bg (on which
the heading of popup appears) is clicked, also the popup closes.
it is not working in apple and mac safari !!!
we are using GB_showcenter function.
the place where we changed is :
GB_showCenter=function(_4c,url,_4e,_4f,_50)
{
var _51={caption:_4c,center_win:false,height:_4e||500,width:_4f||
500,fullscreen:false,callback_fn:_50};
var win=new GB_Window(_51);
return win.show(url);
};
GB_showFullScreen=function(_53,url,_55){
var _56={caption:_53,fullscreen:true,callback_fn:_55};
var win=new GB_Window(_56);
return win.show(url);
};
GB_Window=GreyBox.extend({init:function(_58){
this.parent({});
this.img_header=this.root_dir+"header_bg.jpg";
this.img_close=this.root_dir+"w_close.gif";
this.img_close1=this.root_dir+"w1_close.gif";
this.show_close_img=true;
AJS.update(this,_58);
this.addCallback(this.callback_fn);
},initHook:function(){
AJS.addClass(this.g_window,"GB_Window");
this.header=AJS.TABLE({"class":"header"});
this.header.style.backgroundImage="url("+this.img_header+")";
var _59=AJS.TD({"class":"caption"},this.caption);
AJS.AEV(_59,"click",GB_hide);
---------------------------------------------------------> this is the
line added.
var _5a=AJS.TD({"class":"close"});
if(this.show_close_img){
var _5c=AJS.IMG({"src":this.img_close});
var _5b=AJS.IMG({"src":this.img_close1});
var btn=AJS.DIV(_5b,_5c);
AJS.AEV([_5c,_5b],"mouseover",function(){
AJS.addClass(_5c,"on");
});
AJS.AEV([_5c,_5b],"mouseout",function(){
AJS.removeClass(_5c,"on");
});
AJS.AEV([_5c,_5b],"mousedown",function(){
AJS.addClass(_5c,"click");
});
AJS.AEV([_5c,_5b],"mouseup",function(){
AJS.removeClass(_5c,"click");
});
AJS.AEV([_5c,_5b],"click",GB_hide);
AJS.ACN(_5a,btn);
}
tbody_header=AJS.TBODY();
AJS.ACN(tbody_header,AJS.TR(_59,_5a));
AJS.ACN(this.header,tbody_header);
AJS.ACN(this.top_cnt,this.header);
if(this.fullscreen){
AJS.AEV(window,"scroll",AJS.$b(this.setWindowPosition,this));
}
},setFrameSize:function(){
if(this.fullscreen){
var _5e=AJS.getWindowSize();
overlay_h=_5e.h;
this.width=Math.round(this.overlay.offsetWidth-
(this.overlay.offsetWidth/100)*10);
this.height=Math.round(overlay_h-(overlay_h/100)*10);
}
AJS.setWidth(this.header,this.width+6);
AJS.setWidth(this.iframe,this.width);
AJS.setHeight(this.iframe,this.height);
},setWindowPosition:function(){
var _5f=AJS.getWindowSize();
AJS.setLeft(this.g_window,((_5f.w-this.width)/2)-13);
if(!this.center_win){
AJS.setTop(this.g_window,AJS.getScrollTop());
}else{
var fl=((_5f.h-this.height)/2)-20+AJS.getScrollTop();
if(fl<0){
fl=0;
}
AJS.setTop(this.g_window,fl);
}
}});
AJS.preloadImages(GB_ROOT_DIR+"w_close.gif",GB_ROOT_DIR
+"header_bg.jpg");
script_loaded=true;
i hope i made it clear!!!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"GreyBox" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/greybox?hl=en
-~----------~----~----~----~------~----~------~--~---